Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Massive cleanups in ruby. Not yet working (segfault on task reception)
[simgrid.git] / src / msg / msg_mailbox.c
index f7f3445..9b5cec8 100644 (file)
@@ -109,11 +109,11 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t *task, m_host_t host,
                          double timeout)
 {
   xbt_ex_t e;
-  size_t task_size = sizeof(void*);
   MSG_error_t ret = MSG_OK;
   smx_comm_t comm;
   CHECK_HOST();
 
+  memset(&comm,0,sizeof(comm));
   /* Kept for compatibility with older implementation */
   xbt_assert1(!MSG_mailbox_get_cond(mailbox),
               "A process is already blocked on this channel %s", 
@@ -126,13 +126,13 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t *task, m_host_t host,
     CRITICAL0
       ("MSG_task_get() was asked to write in a non empty task struct.");
 
-  /* We no loger support getting a task from a specific host */
+  /* We no longer support getting a task from a specific host */
   if(host)
     THROW_UNIMPLEMENTED;
 
   /* Try to receive it by calling SIMIX network layer */
   TRY{
-    SIMIX_network_recv(mailbox->rdv, timeout, task, &task_size, &comm);
+    SIMIX_network_recv(mailbox->rdv, timeout, task, NULL, &comm);
     (*task)->simdata->refcount--;
   }
   CATCH(e){
@@ -144,7 +144,7 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t *task, m_host_t host,
         ret = MSG_TRANSFER_FAILURE;
         break;
       case timeout_error:
-        ret = MSG_TRANSFER_FAILURE;
+        ret = MSG_TIMEOUT_FAILURE;
         break;      
       default:
         xbt_die("Unhandled SIMIX network exception");
@@ -198,7 +198,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
         ret = MSG_TRANSFER_FAILURE;
         break;
       case timeout_error:
-        ret = MSG_TRANSFER_FAILURE;
+        ret = MSG_TIMEOUT_FAILURE;
         break;
       default:
         xbt_die("Unhandled SIMIX network exception");