aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-01-05 14:22:01 +0000
committerChristian Grothoff <christian@grothoff.org>2011-01-05 14:22:01 +0000
commitccaa16a2649cde9abbcb7355fc292a1e2d5df277 (patch)
treed6023c47b56d2feeee0393533ce77f0f225af034 /src
parent43542a78c6bfc10dc06196c0702b802eb6a45591 (diff)
downloadlibmicrohttpd-ccaa16a2649cde9abbcb7355fc292a1e2d5df277.tar.gz
libmicrohttpd-ccaa16a2649cde9abbcb7355fc292a1e2d5df277.zip
fix 1639
Diffstat (limited to 'src')
-rw-r--r--src/daemon/connection.c1
-rw-r--r--src/daemon/response.c6
2 files changed, 2 insertions, 5 deletions
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)
310 MHD_connection_close (connection, MHD_REQUEST_TERMINATED_WITH_ERROR); 310 MHD_connection_close (connection, MHD_REQUEST_TERMINATED_WITH_ERROR);
311} 311}
312 312
313
313/** 314/**
314 * Prepare the response buffer of this connection for 315 * Prepare the response buffer of this connection for
315 * sending. Assumes that the response mutex is 316 * 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
270file_reader (void *cls, uint64_t pos, char *buf, size_t max) 270file_reader (void *cls, uint64_t pos, char *buf, size_t max)
271{ 271{
272 struct MHD_Response *response = cls; 272 struct MHD_Response *response = cls;
273 int ret;
274 273
275 pthread_mutex_lock (&response->mutex);
276 (void) lseek (response->fd, pos + response->fd_off, SEEK_SET); 274 (void) lseek (response->fd, pos + response->fd_off, SEEK_SET);
277 ret = read (response->fd, buf, max); 275 return read (response->fd, buf, max);
278 pthread_mutex_unlock (&response->mutex);
279 return ret;
280} 276}
281 277
282 278