diff --git a/ChangeLog b/ChangeLog index af99d574..49cd7b39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jan 5 15:20:11 CET 2011 + Fixing double-locking on non-Linux platforms when using + MHD_create_response_from_fd (#1639). -CG + Tue Jan 4 13:07:21 CET 2011 Added MHD_create_response_from_buffer, deprecating MHD_create_response_from_data. Deprecating @@ -5,11 +9,11 @@ Tue Jan 4 13:07:21 CET 2011 Sun Dec 26 00:02:15 CET 2010 Releasing libmicrohttpd 0.9.4. -CG - + Sat Dec 25 21:57:14 CET 2010 Adding support for basic authentication. Documented how to obtain client SSL certificates in tutorial. -MS - + Thu Dec 23 15:40:36 CET 2010 Increasing nonce length to 128 to support digest authentication with Opera (see #1633). diff --git a/src/daemon/connection.c b/src/daemon/connection.c index f20614dc..58e4e722 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c @@ -310,6 +310,7 @@ connection_close_error (struct MHD_Connection *connection) MHD_connection_close (connection, MHD_REQUEST_TERMINATED_WITH_ERROR); } + /** * Prepare the response buffer of this connection for * sending. Assumes that the response mutex is diff --git a/src/daemon/response.c b/src/daemon/response.c index db846674..aead36ef 100644 --- a/src/daemon/response.c +++ b/src/daemon/response.c @@ -270,13 +270,9 @@ static ssize_t file_reader (void *cls, uint64_t pos, char *buf, size_t max) { struct MHD_Response *response = cls; - int ret; - pthread_mutex_lock (&response->mutex); (void) lseek (response->fd, pos + response->fd_off, SEEK_SET); - ret = read (response->fd, buf, max); - pthread_mutex_unlock (&response->mutex); - return ret; + return read (response->fd, buf, max); }