Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Now that MSG uses sain units, we don't have to convert anymore
[simgrid.git] / src / gras / Msg / sg_msg.c
index ea1a2c5..e6338e1 100644 (file)
@@ -53,7 +53,7 @@ void gras_msg_send_ext(gras_socket_t   sock,
                                              payload, msg->payl);
   } else {
     msg->payl_size=gras_datadesc_size(msgtype->ctn_type);
-    msg->payl=xbt_malloc(msg->payl_size);
+    msg->payl=msg->payl_size?xbt_malloc(msg->payl_size):NULL;
     if (msgtype->ctn_type)
       whole_payload_size = gras_datadesc_copy(msgtype->ctn_type,
                                              payload, msg->payl);
@@ -62,7 +62,7 @@ void gras_msg_send_ext(gras_socket_t   sock,
   msg->kind = kind;
 
   task=MSG_task_create(msgtype->name,0,
-                      ((double)whole_payload_size)/(1024.0*1024.0),msg);
+                      ((double)whole_payload_size),msg);
 
   if (MSG_task_put(task, sock_data->to_host,sock_data->to_chan) != MSG_OK) 
     THROW0(system_error,0,"Problem during the MSG_task_put");