Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make sure we don't change a timeout=0 into a timeout<0, because in select it would...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 Apr 2006 08:25:43 +0000 (08:25 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 Apr 2006 08:25:43 +0000 (08:25 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2058 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Msg/msg.c

index 5b02e5c..7a1f42a 100644 (file)
@@ -292,7 +292,7 @@ gras_msg_wait_ext(double           timeout,
   while (1) {
     memset(&msg,sizeof(msg),0);
 
-    msg.expe = gras_trp_select(timeout - now + start);
+    msg.expe = gras_trp_select(timeout ? timeout - now + start : 0);
     gras_msg_recv(msg.expe, &msg);
     DEBUG0("Got a message from the socket");
 
@@ -485,6 +485,7 @@ gras_msg_handle(double timeOut) {
        }
       }
     } CATCH(e) {
+      free(msg.payl);
       if (msg.type->kind == e_gras_msg_kind_rpccall) {
        /* The callback raised an exception, propagate it on the network */
        e.host = (char*)gras_os_myname();
@@ -518,7 +519,7 @@ gras_msg_handle(double timeOut) {
 
   default:
     THROW1(unknown_error,0,
-          "Cannot handle messages of kind %d yet",msg.type->kind);
+          "Cannot handle messages of kind %d yet",msg.type->kind);
   }
 
 }