mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-10-04 04:03:18 +03:00
fix #5260 as suggested by reporter
This commit is contained in:
3 files changed
+9
-2
No files matched your search
@@ -1,3 +1,7 @@
|
||||
Mon Jan 29 17:33:54 CET 2018
|
||||
Fix deadlock when failing to prepare chunked response
|
||||
(#5260). -CG/ghaderer
|
||||
|
||||
Thu Jan 4 12:24:33 CET 2018
|
||||
Fix __clang_major__ related warnings for non-clang
|
||||
compilers reported by Tim on the mailinglist. -CG
|
||||
|
||||
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
|
||||
* Current version of the library.
|
||||
* 0x01093001 = 1.9.30-1.
|
||||
*/
|
||||
#define MHD_VERSION 0x00095800
|
||||
#define MHD_VERSION 0x00095801
|
||||
|
||||
/**
|
||||
* MHD-internal return code for "YES".
|
||||
|
||||
@@ -1155,6 +1155,7 @@ try_ready_chunked_body (struct MHD_Connection *connection)
|
||||
size /= 2;
|
||||
if (size < 128)
|
||||
{
|
||||
MHD_mutex_unlock_chk_ (&response->mutex);
|
||||
/* not enough memory */
|
||||
CONNECTION_CLOSE_ERROR (connection,
|
||||
_("Closing connection (out of memory)\n"));
|
||||
@@ -1200,6 +1201,7 @@ try_ready_chunked_body (struct MHD_Connection *connection)
|
||||
{
|
||||
/* error, close socket! */
|
||||
response->total_size = connection->response_write_position;
|
||||
MHD_mutex_unlock_chk_ (&response->mutex);
|
||||
CONNECTION_CLOSE_ERROR (connection,
|
||||
_("Closing connection (application error generating response)\n"));
|
||||
return MHD_NO;
|
||||
@@ -1218,6 +1220,7 @@ try_ready_chunked_body (struct MHD_Connection *connection)
|
||||
if (0 == ret)
|
||||
{
|
||||
connection->state = MHD_CONNECTION_CHUNKED_BODY_UNREADY;
|
||||
MHD_mutex_unlock_chk_ (&response->mutex);
|
||||
return MHD_NO;
|
||||
}
|
||||
if (ret > 0xFFFFFF)
|
||||
@@ -3593,7 +3596,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
|
||||
socket_start_no_buffering (connection);
|
||||
continue;
|
||||
}
|
||||
MHD_mutex_unlock_chk_ (&connection->response->mutex);
|
||||
/* mutex was already unlocked by try_ready_chunked_body */
|
||||
break;
|
||||
case MHD_CONNECTION_BODY_SENT:
|
||||
if (MHD_NO == build_header_response (connection))
|
||||
|
||||
Reference in new issue
Block a user