aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index b95c722c..ca7a57ca 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -365,7 +365,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
365 /* either error or http 1.0 transfer, close socket! */ 365 /* either error or http 1.0 transfer, close socket! */
366 response->total_size = connection->response_write_position; 366 response->total_size = connection->response_write_position;
367 if (NULL != response->crc) 367 if (NULL != response->crc)
368 MHD_mutex_unlock_ (&response->mutex); 368 (void) MHD_mutex_unlock_ (&response->mutex);
369 if ( ((ssize_t)MHD_CONTENT_READER_END_OF_STREAM) == ret) 369 if ( ((ssize_t)MHD_CONTENT_READER_END_OF_STREAM) == ret)
370 MHD_connection_close (connection, MHD_REQUEST_TERMINATED_COMPLETED_OK); 370 MHD_connection_close (connection, MHD_REQUEST_TERMINATED_COMPLETED_OK);
371 else 371 else
@@ -379,7 +379,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
379 { 379 {
380 connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY; 380 connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY;
381 if (NULL != response->crc) 381 if (NULL != response->crc)
382 MHD_mutex_unlock_ (&response->mutex); 382 (void) MHD_mutex_unlock_ (&response->mutex);
383 return MHD_NO; 383 return MHD_NO;
384 } 384 }
385 return MHD_YES; 385 return MHD_YES;
@@ -2090,7 +2090,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
2090 case MHD_CONNECTION_NORMAL_BODY_READY: 2090 case MHD_CONNECTION_NORMAL_BODY_READY:
2091 response = connection->response; 2091 response = connection->response;
2092 if (NULL != response->crc) 2092 if (NULL != response->crc)
2093 MHD_mutex_lock_ (&response->mutex); 2093 (void) MHD_mutex_lock_ (&response->mutex);
2094 if (MHD_YES != try_ready_normal_body (connection)) 2094 if (MHD_YES != try_ready_normal_body (connection))
2095 break; 2095 break;
2096 ret = connection->send_cls (connection, 2096 ret = connection->send_cls (connection,
@@ -2110,7 +2110,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
2110 response->data_start]); 2110 response->data_start]);
2111#endif 2111#endif
2112 if (NULL != response->crc) 2112 if (NULL != response->crc)
2113 MHD_mutex_unlock_ (&response->mutex); 2113 (void) MHD_mutex_unlock_ (&response->mutex);
2114 if (ret < 0) 2114 if (ret < 0)
2115 { 2115 {
2116 if ((err == EINTR) || (err == EAGAIN) || (EWOULDBLOCK == err)) 2116 if ((err == EINTR) || (err == EAGAIN) || (EWOULDBLOCK == err))
@@ -2461,18 +2461,18 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
2461 break; 2461 break;
2462 case MHD_CONNECTION_NORMAL_BODY_UNREADY: 2462 case MHD_CONNECTION_NORMAL_BODY_UNREADY:
2463 if (NULL != connection->response->crc) 2463 if (NULL != connection->response->crc)
2464 MHD_mutex_lock_ (&connection->response->mutex); 2464 (void) MHD_mutex_lock_ (&connection->response->mutex);
2465 if (0 == connection->response->total_size) 2465 if (0 == connection->response->total_size)
2466 { 2466 {
2467 if (NULL != connection->response->crc) 2467 if (NULL != connection->response->crc)
2468 MHD_mutex_unlock_ (&connection->response->mutex); 2468 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2469 connection->state = MHD_CONNECTION_BODY_SENT; 2469 connection->state = MHD_CONNECTION_BODY_SENT;
2470 continue; 2470 continue;
2471 } 2471 }
2472 if (MHD_YES == try_ready_normal_body (connection)) 2472 if (MHD_YES == try_ready_normal_body (connection))
2473 { 2473 {
2474 if (NULL != connection->response->crc) 2474 if (NULL != connection->response->crc)
2475 MHD_mutex_unlock_ (&connection->response->mutex); 2475 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2476 connection->state = MHD_CONNECTION_NORMAL_BODY_READY; 2476 connection->state = MHD_CONNECTION_NORMAL_BODY_READY;
2477 break; 2477 break;
2478 } 2478 }
@@ -2483,23 +2483,23 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
2483 break; 2483 break;
2484 case MHD_CONNECTION_CHUNKED_BODY_UNREADY: 2484 case MHD_CONNECTION_CHUNKED_BODY_UNREADY:
2485 if (NULL != connection->response->crc) 2485 if (NULL != connection->response->crc)
2486 MHD_mutex_lock_ (&connection->response->mutex); 2486 (void) MHD_mutex_lock_ (&connection->response->mutex);
2487 if (0 == connection->response->total_size) 2487 if (0 == connection->response->total_size)
2488 { 2488 {
2489 if (NULL != connection->response->crc) 2489 if (NULL != connection->response->crc)
2490 MHD_mutex_unlock_ (&connection->response->mutex); 2490 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2491 connection->state = MHD_CONNECTION_BODY_SENT; 2491 connection->state = MHD_CONNECTION_BODY_SENT;
2492 continue; 2492 continue;
2493 } 2493 }
2494 if (MHD_YES == try_ready_chunked_body (connection)) 2494 if (MHD_YES == try_ready_chunked_body (connection))
2495 { 2495 {
2496 if (NULL != connection->response->crc) 2496 if (NULL != connection->response->crc)
2497 MHD_mutex_unlock_ (&connection->response->mutex); 2497 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2498 connection->state = MHD_CONNECTION_CHUNKED_BODY_READY; 2498 connection->state = MHD_CONNECTION_CHUNKED_BODY_READY;
2499 continue; 2499 continue;
2500 } 2500 }
2501 if (NULL != connection->response->crc) 2501 if (NULL != connection->response->crc)
2502 MHD_mutex_unlock_ (&connection->response->mutex); 2502 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2503 break; 2503 break;
2504 case MHD_CONNECTION_BODY_SENT: 2504 case MHD_CONNECTION_BODY_SENT:
2505 build_header_response (connection); 2505 build_header_response (connection);