Commit ba400d56 authored by Robert Schmidt's avatar Robert Schmidt

reorganize TASK_L2L1 loop

parent a112f2ad
...@@ -446,12 +446,7 @@ void *l2l1_task(void *arg) { ...@@ -446,12 +446,7 @@ void *l2l1_task(void *arg) {
/* Wait for the initialize message */ /* Wait for the initialize message */
printf("Wait for the ITTI initialize message\n"); printf("Wait for the ITTI initialize message\n");
do { while (1) {
if (message_p != NULL) {
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
}
itti_receive_msg (TASK_L2L1, &message_p); itti_receive_msg (TASK_L2L1, &message_p);
switch (ITTI_MSG_ID(message_p)) { switch (ITTI_MSG_ID(message_p)) {
...@@ -472,42 +467,12 @@ void *l2l1_task(void *arg) { ...@@ -472,42 +467,12 @@ void *l2l1_task(void *arg) {
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p)); LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
break; break;
} }
} while (ITTI_MSG_ID(message_p) != INITIALIZE_MESSAGE);
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p); result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
/* ???? no else but seems to be UE only ??? message_p = NULL;
do { };
// Wait for a message
itti_receive_msg (TASK_L2L1, &message_p);
switch (ITTI_MSG_ID(message_p)) {
case TERMINATE_MESSAGE:
oai_exit=1;
itti_exit_task ();
break;
case ACTIVATE_MESSAGE:
start_UE = 1;
break;
case DEACTIVATE_MESSAGE:
start_UE = 0;
break;
case MESSAGE_TEST:
LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
break;
default:
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
break;
}
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
} while(!oai_exit);
*/
return NULL; return NULL;
} }
#endif #endif
...@@ -796,7 +761,6 @@ extern void phy_free_RU(RU_t*); ...@@ -796,7 +761,6 @@ extern void phy_free_RU(RU_t*);
int stop_L1L2(module_id_t enb_id) int stop_L1L2(module_id_t enb_id)
{ {
LOG_W(ENB_APP, "stopping lte-softmodem\n"); LOG_W(ENB_APP, "stopping lte-softmodem\n");
oai_exit = 1;
if (!RC.ru) { if (!RC.ru) {
LOG_F(ENB_APP, "no RU configured\n"); LOG_F(ENB_APP, "no RU configured\n");
......
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