This commit is contained in:
Christian Grothoff
2008-02-12 03:58:08 +00:00
parent 414b84ec9e
commit a814302ead
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -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;
+2
View File
@@ -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;