Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The server timeouts after a while instead of running for ever (useful for solaris...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 11 Jul 2004 22:34:39 +0000 (22:34 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 11 Jul 2004 22:34:39 +0000 (22:34 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@243 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/ping/ping.c

index 39ca8dd..5724135 100644 (file)
@@ -116,13 +116,10 @@ int server (int argc,char *argv[]) {
        gras_socket_my_port(g->sock));
   g->endcondition=0;
 
-  while (1) {
-    errcode = gras_msg_handle(10.0);
-    if (errcode != no_error && errcode != timeout_error) 
-      return errcode;
-    if (g->endcondition)
-      break;
-  }
+  errcode = gras_msg_handle(600.0);
+  if (errcode != no_error)
+    return errcode;
+  if (g->endcondition)
   
   if (!gras_if_RL())
     gras_sleep(5,0);