Commit 62bcd5ed authored by Cedric Roux's avatar Cedric Roux

fix: create tasks before sync in oaisim

Not sure if this is the right thing to do, but it seems to be.

"start_eNB = 1;" is also necessary when the l2l1 task gets INITIALIZE_MESSAGE
otherwise the eNB does not start.

As it is today, I don't think oaisim will work with more than one eNB.
parent 3e77251f
......@@ -589,6 +589,7 @@ l2l1_task (void *args_p)
switch (ITTI_MSG_ID(message_p)) {
case INITIALIZE_MESSAGE:
l2l1_state = L2L1_RUNNING;
start_eNB = 1;
break;
case ACTIVATE_MESSAGE:
......@@ -1276,6 +1277,11 @@ main (int argc, char **argv)
init_ocm ();
#if defined(ENABLE_ITTI)
if (create_tasks(oai_emulation.info.nb_enb_local, oai_emulation.info.nb_ue_local) < 0)
exit(1);
#endif
// wait for all threads to startup
sleep(3);
printf("Sending sync to all threads\n");
......@@ -1316,11 +1322,7 @@ main (int argc, char **argv)
#if defined(ENABLE_ITTI)
// Handle signals until all tasks are terminated
if (create_tasks(oai_emulation.info.nb_enb_local, oai_emulation.info.nb_ue_local) >= 0) {
itti_wait_tasks_end();
} else {
exit(-1); // need a softer mode
}
itti_wait_tasks_end();
#else
......
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