From 60f8fbba5b4c261e252b44a8fcdb7347cbc10367 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 Nov 2009 13:41:07 +0000 Subject: [PATCH] better, use time_t --- src/daemon/daemon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 09ef7a6d..44467329 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -488,7 +488,7 @@ MHD_handle_connection (void *data) int max; struct timeval tv; unsigned int timeout; - unsigned int now; + time_t now; struct MHD_Pollfd mp; struct pollfd p; @@ -496,8 +496,7 @@ MHD_handle_connection (void *data) while ((!con->daemon->shutdown) && (con->socket_fd != -1)) { now = time (NULL); tv.tv_usec = 0; - if ( ( (timeout > (now - con->last_activity)) && - (now > con->last_activity) ) || + if ( (timeout > (now - con->last_activity)) || (timeout == 0) ) { /* in case we are missing the SIGALRM, keep going after