Commit 9e509938 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

Fix for memory related issue

parent 81e2ba71
......@@ -1420,7 +1420,7 @@ pdcp_run (
break;
}
message_p = itti_alloc_new_message (TASK_PDCP_ENB, ctxt_pP->module_id, SS_GET_PDCP_CNT);
message_p = itti_alloc_new_message (TASK_PDCP_ENB, 0, SS_GET_PDCP_CNT);
SS_GET_PDCP_CNT(message_p).size = 0;
......
......@@ -343,7 +343,7 @@ mac_rrc_data_ind(
if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE)
{
LOG_I(RRC,"RRC Sending CCCH PDU_IND to SS \n");
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, 0, SS_RRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, SS_RRC_PDU_IND);
if (message_p) {
/* Populate the message to SS */
SS_RRC_PDU_IND (message_p).sdu_size = sdu_lenP;
......
......@@ -125,7 +125,7 @@ rrc_data_ind(
if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE)
{
LOG_I(RRC,"L2 Interface Sending DCCH PDU_IND to SS \n");
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, ctxt_pP->instance, SS_RRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, SS_RRC_PDU_IND);
if (message_p) {
/* Populate the message and send to SS */
SS_RRC_PDU_IND (message_p).sdu_size = sdu_sizeP;
......@@ -136,7 +136,7 @@ rrc_data_ind(
memset (SS_RRC_PDU_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
memcpy (SS_RRC_PDU_IND (message_p).sdu, buffer_pP, sdu_sizeP);
int send_res = itti_send_msg_to_task (TASK_SS_SRB, ctxt_pP->instance, message_p);
int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p);
if(send_res < 0) {
LOG_E(RRC,"Error in itti_send_msg_to_task");
}
......
......@@ -3784,6 +3784,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
if (RC.ss.mode == SS_ENB) {
memset(buffer, 0, sizeof(buffer));
size = do_RRCConnectionReconfiguration(ctxt_pP,
buffer,
......@@ -3811,6 +3812,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
(LTE_SCellToAddMod_r10_t *) NULL
);
LOG_DUMPMSG(RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Connection Reconfiguration\n");
}
/* Free all NAS PDUs */
for (i = 0; i < ue_context_pP->ue_context.nb_of_e_rabs; i++) {
......@@ -10036,14 +10038,6 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
RRC_DCCH_DATA_IND(msg_p).dcch_index,
RRC_DCCH_DATA_IND(msg_p).sdu_p,
RRC_DCCH_DATA_IND(msg_p).sdu_size);
// Message buffer has been processed, free it now.
result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), RRC_DCCH_DATA_IND(msg_p).sdu_p);
if (result != EXIT_SUCCESS) {
LOG_I(RRC, "Failed to free memory (%d)!\n",result);
break;
}
break;
/* Messages from S1AP */
......
......@@ -146,7 +146,7 @@ static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind){
static void ss_task_handle_drb_pdu_req(struct DRB_COMMON_REQ *req)
{
assert(req);
MessageDef *message_p = itti_alloc_new_message(TASK_PDCP_ENB, instance_g, SS_DRB_PDU_REQ);
MessageDef *message_p = itti_alloc_new_message(TASK_PDCP_ENB, 0, SS_DRB_PDU_REQ);
assert(message_p);
if (message_p)
{
......
......@@ -208,7 +208,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
assert(req);
LTE_DL_DCCH_Message_t *dl_dcch_msg=NULL;
LTE_DL_CCCH_Message_t *dl_ccch_msg=NULL;
MessageDef *message_p = itti_alloc_new_message(TASK_RRC_ENB, instance_g, SS_RRC_PDU_REQ);
MessageDef *message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, SS_RRC_PDU_REQ);
assert(message_p);
instance_g = 0;
if (message_p)
......@@ -456,7 +456,8 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
result = itti_free(ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
AssertFatal(result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
};
received_msg = NULL;
}
break;
case TERMINATE_MESSAGE:
......
......@@ -286,7 +286,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
uint8_t num_CC = 0; /** NOTE: Handling only one cell */
for (int enb_id = 0; enb_id < RC.nb_inst; enb_id++)
{
MessageDef *msg_p = itti_alloc_new_message(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(enb_id), RRC_CONFIGURATION_REQ);
MessageDef *msg_p = itti_alloc_new_message(TASK_SYS, 0, RRC_CONFIGURATION_REQ);
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
if (AddOrReconfigure->Basic.d == true)
......
......@@ -263,7 +263,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
//#ifdef ENB_SS
if (RC.ss.mode >= SS_SOFTMODEM)
{
MessageDef *message_p = itti_alloc_new_message(TASK_SYS, 0, SS_UPD_TIM_INFO);
MessageDef *message_p = itti_alloc_new_message(TASK_ENB_APP, 0, SS_UPD_TIM_INFO);
if (message_p)
{
SS_UPD_TIM_INFO(message_p).sf = eNB->UL_INFO.subframe;
......@@ -278,7 +278,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
LOG_D(PHY, "[SS] SS_UPD_TIM_INFO from L1_Thread to SYS task itti_send_msg_to_task sfn %d sf %d",
eNB->UL_INFO.subframe, eNB->UL_INFO.frame); /** TODO: Need separate logging for SS */
}
MessageDef *message_p_vtp = itti_alloc_new_message(TASK_VTP, 0, SS_UPD_TIM_INFO);
MessageDef *message_p_vtp = itti_alloc_new_message(TASK_ENB_APP, 0, SS_UPD_TIM_INFO);
if (message_p_vtp && RC.ss.vtp_ready)
{
SS_UPD_TIM_INFO(message_p_vtp).sf = eNB->UL_INFO.subframe;
......@@ -292,7 +292,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
LOG_A(PHY, "[SS] SS_UPD_TIM_INFO from L1_Thread to VTP task itti_send_msg_to_task sfn %d sf %d",
eNB->UL_INFO.subframe, eNB->UL_INFO.frame); /** TODO: Need separate logging for SS */
}
MessageDef *message_p_vt_timer = itti_alloc_new_message(TASK_VT_TIMER, 0, SS_UPD_TIM_INFO);
MessageDef *message_p_vt_timer = itti_alloc_new_message(TASK_ENB_APP, 0, SS_UPD_TIM_INFO);
if (message_p_vt_timer)
{
SS_UPD_TIM_INFO(message_p_vt_timer).sf = eNB->UL_INFO.subframe;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment