gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r19263 - in libmicrohttpd: . src/daemon


From: gnunet
Subject: [GNUnet-SVN] r19263 - in libmicrohttpd: . src/daemon
Date: Thu, 19 Jan 2012 17:47:20 +0100

Author: grothoff
Date: 2012-01-19 17:47:20 +0100 (Thu, 19 Jan 2012)
New Revision: 19263

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/daemon/daemon.c
Log:
tclaveirole: fixing #2085 with patch from the bugreport

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2012-01-19 16:40:57 UTC (rev 19262)
+++ libmicrohttpd/ChangeLog     2012-01-19 16:47:20 UTC (rev 19263)
@@ -1,3 +1,8 @@
+Thu Jan 19 17:46:05 CET 2012                                                   
                                                                                
                               
+       Fixing use of uninitialized 'earliest_deadline' variable in 
+       MHD_get_timeout which can lead to returning an incorrect
+       (too early) timeout (#2085). -tclaveirole
+
 Thu Jan 19 13:31:27 CET 2012
        Fixing digest authentication for GET requests with URI arguments
        (#2059). -CG

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2012-01-19 16:40:57 UTC (rev 19262)
+++ libmicrohttpd/src/daemon/daemon.c   2012-01-19 16:47:20 UTC (rev 19263)
@@ -1219,14 +1219,15 @@
   while (pos != NULL)
     {
       if (0 != pos->connection_timeout) {
-        have_timeout = MHD_YES;
-        if (earliest_deadline > pos->last_activity + pos->connection_timeout)
+        if (!have_timeout ||
+           earliest_deadline > pos->last_activity + pos->connection_timeout)
           earliest_deadline = pos->last_activity + pos->connection_timeout;
 #if HTTPS_SUPPORT
         if (  (0 != (daemon->options & MHD_USE_SSL)) &&
              (0 != gnutls_record_check_pending (pos->tls_session)) )
          earliest_deadline = 0;
 #endif
+        have_timeout = MHD_YES;
       }
       pos = pos->next;
     }




reply via email to

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