commit a814302ead387f3c40dc54aeccde2362169d92a6 parent 414b84ec9e0fd359bfa37216d5c77892c86b322a Author: Christian Grothoff <christian@grothoff.org> Date: Tue, 12 Feb 2008 03:58:08 +0000 fx Diffstat:
| M | src/daemon/connection.c | | | 3 | ++- |
| M | src/daemon/postprocessor.c | | | 2 | ++ |
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git 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 @@ -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;