Parcourir la source

MHD_get_timeout(): fixed return of latest timeout instead of earliest.

Evgeny Grin (Karlson2k) il y a 9 ans
Parent
commit
abc6bac2fb
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/microhttpd/daemon.c

+ 2 - 2
src/microhttpd/daemon.c

@@ -2995,8 +2995,8 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
 	  have_timeout = MHD_YES;
 	}
     }
-  /* normal timeouts are sorted, so we only need to look at the 'head' */
-  pos = daemon->normal_timeout_head;
+  /* normal timeouts are sorted, so we only need to look at the 'tail' (oldest) */
+  pos = daemon->normal_timeout_tail;
   if ( (NULL != pos) &&
        (0 != pos->connection_timeout) )
     {