diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-02-12 03:58:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-02-12 03:58:08 +0000 |
commit | a814302ead387f3c40dc54aeccde2362169d92a6 (patch) | |
tree | 81f8f9a191e3047558a74b4b6702eae68e79f9e9 | |
parent | 414b84ec9e0fd359bfa37216d5c77892c86b322a (diff) | |
download | libmicrohttpd-a814302ead387f3c40dc54aeccde2362169d92a6.tar.gz libmicrohttpd-a814302ead387f3c40dc54aeccde2362169d92a6.zip |
fx
-rw-r--r-- | src/daemon/connection.c | 3 | ||||
-rw-r--r-- | src/daemon/postprocessor.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c index c82278cb..7c153304 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c | |||
@@ -1830,7 +1830,8 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
1830 | break; | 1830 | break; |
1831 | } | 1831 | } |
1832 | timeout = connection->daemon->connection_timeout; | 1832 | timeout = connection->daemon->connection_timeout; |
1833 | if ((timeout != 0) && (time (NULL) - timeout > connection->last_activity)) | 1833 | if ( (connection->socket_fd != -1) && |
1834 | (timeout != 0) && (time (NULL) - timeout > connection->last_activity)) | ||
1834 | { | 1835 | { |
1835 | connection_close_error (connection); | 1836 | connection_close_error (connection); |
1836 | return MHD_NO; | 1837 | return MHD_NO; |
diff --git a/src/daemon/postprocessor.c b/src/daemon/postprocessor.c index 7147c114..5b8f01a2 100644 --- a/src/daemon/postprocessor.c +++ b/src/daemon/postprocessor.c | |||
@@ -281,6 +281,8 @@ MHD_create_post_processor (struct MHD_Connection *connection, | |||
281 | (blen * 2 + 2 > buffer_size) ) | 281 | (blen * 2 + 2 > buffer_size) ) |
282 | return NULL; /* (will be) out of memory or invalid boundary */ | 282 | return NULL; /* (will be) out of memory or invalid boundary */ |
283 | } | 283 | } |
284 | else | ||
285 | blen = 0; | ||
284 | ret = malloc (sizeof (struct MHD_PostProcessor) + buffer_size + 1); | 286 | ret = malloc (sizeof (struct MHD_PostProcessor) + buffer_size + 1); |
285 | if (ret == NULL) | 287 | if (ret == NULL) |
286 | return NULL; | 288 | return NULL; |