gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r26996 - libmicrohttpd/src/daemon


From: gnunet
Subject: [GNUnet-SVN] r26996 - libmicrohttpd/src/daemon
Date: Fri, 26 Apr 2013 11:51:10 +0200

Author: grothoff
Date: 2013-04-26 11:51:10 +0200 (Fri, 26 Apr 2013)
New Revision: 26996

Modified:
   libmicrohttpd/src/daemon/daemon.c
Log:
handle case where poll/select have nothing left to do

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2013-04-26 09:38:24 UTC (rev 26995)
+++ libmicrohttpd/src/daemon/daemon.c   2013-04-26 09:51:10 UTC (rev 26996)
@@ -1468,6 +1468,8 @@
       timeout.tv_sec = ltimeout / 1000;
       tv = &timeout;
     }
+  if (-1 == max)
+    return MHD_YES;
   num_ready = SELECT (max + 1, &rs, &ws, &es, tv);
   if (MHD_YES == daemon->shutdown)
     return MHD_NO;
@@ -1555,6 +1557,8 @@
          p[poll_server+i].events |= POLLOUT;
        i++;
       }
+    if (0 == poll_server + num_connections)
+      return MHD_YES;
     if (poll (p, poll_server + num_connections, timeout) < 0) 
       {
        if (EINTR == errno)
@@ -1635,6 +1639,8 @@
     timeout = 0;
   else
     timeout = -1;
+  if (0 == poll_count)
+    return MHD_YES;
   if (poll (p, poll_count, timeout) < 0)
     {
       if (EINTR == errno)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]