summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-02-12 03:58:08 +0000
committerChristian Grothoff <christian@grothoff.org>2008-02-12 03:58:08 +0000
commita814302ead387f3c40dc54aeccde2362169d92a6 (patch)
tree81f8f9a191e3047558a74b4b6702eae68e79f9e9
parent414b84ec9e0fd359bfa37216d5c77892c86b322a (diff)
fx
-rw-r--r--src/daemon/connection.c3
-rw-r--r--src/daemon/postprocessor.c2
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)
break;
}
timeout = connection->daemon->connection_timeout;
- if ((timeout != 0) && (time (NULL) - timeout > connection->last_activity))
+ if ( (connection->socket_fd != -1) &&
+ (timeout != 0) && (time (NULL) - timeout > connection->last_activity))
{
connection_close_error (connection);
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,
(blen * 2 + 2 > buffer_size) )
return NULL; /* (will be) out of memory or invalid boundary */
}
+ else
+ blen = 0;
ret = malloc (sizeof (struct MHD_PostProcessor) + buffer_size + 1);
if (ret == NULL)
return NULL;