Commit fb843989 authored by winckel's avatar winckel

Modified ITTI to not transmit message for "TASK_UNKNOWN", this allow using...

Modified ITTI to not transmit message for "TASK_UNKNOWN", this allow using message to this task for debug purpose.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4362 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 113c5c37
...@@ -241,6 +241,14 @@ int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *me ...@@ -241,6 +241,14 @@ int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *me
priority = itti_get_message_priority (message_id); priority = itti_get_message_priority (message_id);
/* Increment the global message number */
message_number = itti_increment_message_number ();
itti_dump_queue_message (message_number, message, itti_desc.messages_info[message_id].name,
MESSAGE_SIZE(message_id));
if (task_id != TASK_UNKNOWN)
{
/* We cannot send a message if the task is not running */ /* We cannot send a message if the task is not running */
DevCheck(itti_desc.threads[thread_id].task_state == TASK_STATE_READY, itti_desc.threads[thread_id].task_state, DevCheck(itti_desc.threads[thread_id].task_state == TASK_STATE_READY, itti_desc.threads[thread_id].task_state,
TASK_STATE_READY, thread_id); TASK_STATE_READY, thread_id);
...@@ -258,17 +266,11 @@ int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *me ...@@ -258,17 +266,11 @@ int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *me
new = (struct message_list_s *) malloc (sizeof(struct message_list_s)); new = (struct message_list_s *) malloc (sizeof(struct message_list_s));
DevAssert(new != NULL); DevAssert(new != NULL);
/* Increment the global message number */
message_number = itti_increment_message_number ();
/* Fill in members */ /* Fill in members */
new->msg = message; new->msg = message;
new->message_number = message_number; new->message_number = message_number;
new->message_priority = priority; new->message_priority = priority;
itti_dump_queue_message (message_number, message, itti_desc.messages_info[message_id].name,
MESSAGE_SIZE(message_id));
#if defined(ENABLE_EVENT_FD) #if defined(ENABLE_EVENT_FD)
{ {
uint64_t sem_counter = 1; uint64_t sem_counter = 1;
...@@ -317,6 +319,7 @@ int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *me ...@@ -317,6 +319,7 @@ int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *me
/* Release the mutex */ /* Release the mutex */
pthread_mutex_unlock (&itti_desc.tasks[task_id].message_queue_mutex); pthread_mutex_unlock (&itti_desc.tasks[task_id].message_queue_mutex);
#endif #endif
}
ITTI_DEBUG( ITTI_DEBUG(
"Message %s, number %lu with priority %d successfully sent to queue (%u:%s)\n", "Message %s, number %lu with priority %d successfully sent to queue (%u:%s)\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