Commit 10944d4a authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'issue325_itti_assertion' into 'develop'

fix: avoid assertion when terminating lte-softmodem process.

See merge request oai/openairinterface5g!341
parents ee8c4e89 80db7737
...@@ -330,14 +330,15 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me ...@@ -330,14 +330,15 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
if (destination_task_id != TASK_UNKNOWN) { if (destination_task_id != TASK_UNKNOWN) {
if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED) { if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED ||
ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), ended destination task!\n", itti_desc.threads[destination_thread_id].task_state == TASK_STATE_NOT_CONFIGURED) {
itti_desc.messages_info[message_id].name, ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), unconfigured or ended destination task!\n",
message_number, itti_desc.messages_info[message_id].name,
priority, message_number,
itti_get_task_name(origin_task_id), priority,
destination_task_id, itti_get_task_name(origin_task_id),
itti_get_task_name(destination_task_id)); destination_task_id,
itti_get_task_name(destination_task_id));
} else { } else {
if(!emulate_rf){ if(!emulate_rf){
/* We cannot send a message if the task is not running */ /* We cannot send a message if the task is not running */
...@@ -425,14 +426,15 @@ int itti_try_send_msg_to_task(task_id_t destination_task_id, instance_t instance ...@@ -425,14 +426,15 @@ int itti_try_send_msg_to_task(task_id_t destination_task_id, instance_t instance
if (destination_task_id != TASK_UNKNOWN) { if (destination_task_id != TASK_UNKNOWN) {
if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED) { if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED ||
ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), ended destination task!\n", itti_desc.threads[destination_thread_id].task_state == TASK_STATE_NOT_CONFIGURED) {
itti_desc.messages_info[message_id].name, ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), unconfigured or ended destination task!\n",
message_number, itti_desc.messages_info[message_id].name,
priority, message_number,
itti_get_task_name(origin_task_id), priority,
destination_task_id, itti_get_task_name(origin_task_id),
itti_get_task_name(destination_task_id)); destination_task_id,
itti_get_task_name(destination_task_id));
} else { } else {
/* We cannot send a message if the task is not running */ /* We cannot send a message if the task is not running */
AssertFatal (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_READY, AssertFatal (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_READY,
......
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