aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/connection.c')
-rw-r--r--src/daemon/connection.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
index b9aee0e1..532cab49 100644
--- a/src/daemon/connection.c
+++ b/src/daemon/connection.c
@@ -291,11 +291,6 @@ MHD_connection_close (struct MHD_Connection *connection,
291 CLOSE (connection->socket_fd); 291 CLOSE (connection->socket_fd);
292 connection->socket_fd = -1; 292 connection->socket_fd = -1;
293 connection->state = MHD_CONNECTION_CLOSED; 293 connection->state = MHD_CONNECTION_CLOSED;
294 if (connection->response != NULL)
295 {
296 MHD_destroy_response (connection->response);
297 connection->response = NULL;
298 }
299 if ( (NULL != connection->daemon->notify_completed) && 294 if ( (NULL != connection->daemon->notify_completed) &&
300 (MHD_YES == connection->client_aware) ) 295 (MHD_YES == connection->client_aware) )
301 connection->daemon->notify_completed (connection->daemon-> 296 connection->daemon->notify_completed (connection->daemon->
@@ -346,6 +341,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
346 return MHD_YES; 341 return MHD_YES;
347 } 342 }
348#endif 343#endif
344
349 ret = response->crc (response->crc_cls, 345 ret = response->crc (response->crc_cls,
350 connection->response_write_position, 346 connection->response_write_position,
351 response->data, 347 response->data,
@@ -367,7 +363,8 @@ try_ready_normal_body (struct MHD_Connection *connection)
367 socket! */ 363 socket! */
368#if DEBUG_CLOSE 364#if DEBUG_CLOSE
369#if HAVE_MESSAGES 365#if HAVE_MESSAGES
370 MHD_DLOG (connection->daemon, "Closing connection (end of response)\n"); 366 MHD_DLOG (connection->daemon,
367 "Closing connection (end of response)\n");
371#endif 368#endif
372#endif 369#endif
373 response->total_size = connection->response_write_position; 370 response->total_size = connection->response_write_position;
@@ -700,6 +697,7 @@ transmit_error_response (struct MHD_Connection *connection,
700 "Error %u (`%s') processing request, closing connection.\n", 697 "Error %u (`%s') processing request, closing connection.\n",
701 status_code, message); 698 status_code, message);
702#endif 699#endif
700 EXTRA_CHECK (connection->response == NULL);
703 response = MHD_create_response_from_data (strlen (message), 701 response = MHD_create_response_from_data (strlen (message),
704 (void *) message, MHD_NO, MHD_NO); 702 (void *) message, MHD_NO, MHD_NO);
705 MHD_queue_response (connection, status_code, response); 703 MHD_queue_response (connection, status_code, response);