Commit 4c5e1cb5 authored by Swetank Srivastava's avatar Swetank Srivastava Committed by Vijay C

Working 8.2.1.6 changes

parent cf54645b
......@@ -147,7 +147,7 @@ extern "C" {
task_list_t *t=tasks[destination_task_id];
pthread_mutex_lock (&t->queue_cond_lock);
int ret=itti_send_msg_to_task_locked(destination_task_id, destinationInstance, message);
LOG_I(ITTI, "src task:%s dest task:%s msg_name:%s\n",ITTI_MSG_ORIGIN_NAME(message), ITTI_MSG_DESTINATION_NAME(message), ITTI_MSG_NAME(message) );
while ( t->message_queue.size()>0 && t->admin.func != NULL ) {
if (t->message_queue.size()>1)
LOG_W(ITTI,"queue in no thread mode is %ld\n", t->message_queue.size());
......@@ -292,7 +292,7 @@ extern "C" {
} else {
*received_msg=t->message_queue.back();
t->message_queue.pop_back();
LOG_D(ITTI,"task %s received a message\n",t->admin.name);
LOG_D(ITTI,"task %s received message from task:%s \n",t->admin.name, ITTI_MSG_ORIGIN_NAME(*received_msg));
}
pthread_mutex_unlock (&t->queue_cond_lock);
......
......@@ -52,7 +52,6 @@
#include "ss_eNB_context.h"
#include "acpSys.h"
extern int prc;
extern RAN_CONTEXT_t RC;
extern int cell_index;
acpCtx_t ctx_g = NULL;
......@@ -339,7 +338,7 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
size_t msgSize = size; //2
unsigned char *buffer = (unsigned char *)acpMalloc(size);
assert(buffer);
LOG_D(ENB_SS_PORTMAN, "Entry from fxn:%s\n", __FUNCTION__);
LOG_D(ENB_SS_PORTMAN, "Entry in fxn:%s\n", __FUNCTION__);
int userId = acpRecvMsg(ctx, &msgSize, buffer);
// Error handling
......@@ -406,7 +405,6 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
acpFree(buffer);
return;
}
ss_dumpReqMsg(req);
if (userId == MSG_SysProcess_userId)
......@@ -415,6 +413,9 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
struct SYSTEM_CTRL_REQ *sys_req = (struct SYSTEM_CTRL_REQ *)req;
if (sys_req->Request.d == SystemRequest_Type_EnquireTiming)
{
LOG_I(ENB_SS_PORTMAN, "Locked the mutex for enq Timing\n");
LOG_I(ENB_SS_PORTMAN, "Received EnquireTiming\n");
ret_Val = ss_eNB_port_man_handle_enquiryTiming(sys_req);
if (ret_Val == false)
......@@ -425,7 +426,14 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, 0, SS_SYS_PORT_MSG_IND);
if (message_p)
{
SS_SYS_PORT_MSG_IND(message_p).req = req;
SS_SYS_PORT_MSG_IND(message_p).req = (struct SYSTEM_CTRL_REQ *)malloc(sizeof(struct SYSTEM_CTRL_REQ));
if (SS_SYS_PORT_MSG_IND(message_p).req == NULL)
{
LOG_E(ENB_SS_PORTMAN, "Error allocating memory for SYSTEM CTRL REQ\n");
return;
}
memset(SS_SYS_PORT_MSG_IND(message_p).req, 0, sizeof(struct SYSTEM_CTRL_REQ));
memcpy(SS_SYS_PORT_MSG_IND(message_p).req, req, sizeof(struct SYSTEM_CTRL_REQ));
SS_SYS_PORT_MSG_IND(message_p).userId = userId;
if (SS_SYS_PORT_MSG_IND(message_p).req)
itti_send_msg_to_task(TASK_SYS, 0, message_p);
......
......@@ -2462,6 +2462,7 @@ void *ss_eNB_sys_process_itti_msg(void *notUsed)
case SS_SYS_PORT_MSG_IND:
{
if (valid_sys_msg(SS_SYS_PORT_MSG_IND(received_msg).req))
{
ss_task_sys_handle_req(SS_SYS_PORT_MSG_IND(received_msg).req, &tinfo);
......@@ -2470,6 +2471,9 @@ void *ss_eNB_sys_process_itti_msg(void *notUsed)
{
LOG_A(ENB_SS_SYS_TASK, "Not hanled SYS_PORT message received \n");
}
if (SS_SYS_PORT_MSG_IND(received_msg).req)
free(SS_SYS_PORT_MSG_IND(received_msg).req);
}
break;
......@@ -2596,6 +2600,7 @@ printf("VNG send to proxy cell_index %d\n",req->header.cell_index);
ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg));
break;
}
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;
......
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