gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r9557 - libmicrohttpd/src/daemon
Date: Mon, 16 Nov 2009 06:40:10 -0700

Author: grothoff
Date: 2009-11-16 06:40:10 -0700 (Mon, 16 Nov 2009)
New Revision: 9557

Modified:
   libmicrohttpd/src/daemon/daemon.c
Log:
better, and check against overflow

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2009-11-16 13:39:11 UTC (rev 9556)
+++ libmicrohttpd/src/daemon/daemon.c   2009-11-16 13:40:10 UTC (rev 9557)
@@ -493,12 +493,12 @@
   struct pollfd p;
 
   timeout = con->daemon->connection_timeout;
-  if (timeout == 0)
-    timeout = -1; /* 'forever' */
   while ((!con->daemon->shutdown) && (con->socket_fd != -1)) {
       now = time (NULL);
       tv.tv_usec = 0;
-      if (timeout > (now - con->last_activity))
+      if ( ( (timeout > (now - con->last_activity)) &&
+            (now > con->last_activity) ) ||
+          (timeout == 0) )
        {
          /* in case we are missing the SIGALRM, keep going after
             at most 1s; see 
http://lists.gnu.org/archive/html/libmicrohttpd/2009-10/msg00013.html */





reply via email to

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