commit ccaa16a2649cde9abbcb7355fc292a1e2d5df277
parent 43542a78c6bfc10dc06196c0702b802eb6a45591
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 5 Jan 2011 14:22:01 +0000
fix 1639
Diffstat:
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git 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
@@ -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
@@ -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);
}