libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit c716e9378567ad08ada106e0c1ecdac004851967
parent 460faa5574b885979d24f57ba74b5ce1cfdb7b2b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 16 Jun 2007 09:53:54 +0000

locking

Diffstat:
Msrc/daemon/session.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/daemon/session.c b/src/daemon/session.c @@ -703,12 +703,17 @@ MHD_session_handle_write(struct MHD_Session * session) { response->data_size = session->messagePos; CLOSE(session->socket_fd); session->socket_fd = -1; + if (response->crc != NULL) + pthread_mutex_unlock(&response->mutex); return MHD_YES; } response->data_start = session->messagePos; response->data_size = ret; - if (ret == 0) + if (ret == 0) { + if (response->crc != NULL) + pthread_mutex_unlock(&response->mutex); return MHD_YES; + } } /* transmit */