Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow to select on socket 0
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 14 Feb 2005 00:09:05 +0000 (00:09 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 14 Feb 2005 00:09:05 +0000 (00:09 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1017 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Transport/rl_transport.c

index ee1cd47..e9eba7e 100644 (file)
@@ -70,7 +70,7 @@ gras_trp_select(double timeout,
 
     /* construct the set of socket to ear from */
     FD_ZERO(&FDS);
 
     /* construct the set of socket to ear from */
     FD_ZERO(&FDS);
-    max_fds = 0;
+    max_fds = -1;
     xbt_dynar_foreach(sockets,cursor,sock_iter) {
       if (sock_iter->incoming) {
        DEBUG1("Considering socket %d for select",sock_iter->sd);
     xbt_dynar_foreach(sockets,cursor,sock_iter) {
       if (sock_iter->incoming) {
        DEBUG1("Considering socket %d for select",sock_iter->sd);
@@ -84,7 +84,7 @@ gras_trp_select(double timeout,
       }
     }
 
       }
     }
 
-    if (max_fds == 0) {
+    if (max_fds == -1) {
        if (timeout > 0) {
          DEBUG0("No socket to select onto. Sleep instead.");
          gras_os_sleep(timeout,0);
        if (timeout > 0) {
          DEBUG0("No socket to select onto. Sleep instead.");
          gras_os_sleep(timeout,0);