From 154e7127259412a43862ef48422979ec5ba1d01e Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Wed, 27 May 2009 10:39:38 +0000 Subject: Fix mismatch in size of used buffer to prevent an infinite loop A mismatch in the size of the used buffer, between reading and then further writing caused an infinite loop and big files(1Mb, 10Mb etc) could not be downloaded through the lighttpd web service using mod_glusterfs. This is because the big file which is broken up into chunks, has a read and a subsequent write. Signed-off-by: Anand V. Avati --- mod_glusterfs/lighttpd/1.4/mod_glusterfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod_glusterfs') diff --git a/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c b/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c index 0fefd66f5..d565dce28 100644 --- a/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c +++ b/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c @@ -270,7 +270,7 @@ mod_glusterfs_read_async (server *srv, connection *con, chunk *glusterfs_chunk) check += buf->vector[i].iov_len; - nw_write_buf->used = buf->vector[i].iov_len; + nw_write_buf->used = buf->vector[i].iov_len + 1; nw_write_buf->size = buf->vector[i].iov_len; nw_write_buf->ptr = buf->vector[i].iov_base; -- cgit