summaryrefslogtreecommitdiffstats
path: root/mod_glusterfs
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2009-05-27 10:39:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-05-29 02:18:08 -0700
commit154e7127259412a43862ef48422979ec5ba1d01e (patch)
tree0ccde48526a8b58aaf98727986715eeedeb09176 /mod_glusterfs
parent01b9e590559ea810fb271e91127b3de7fc26816a (diff)
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 <avati@dev.gluster.com>
Diffstat (limited to 'mod_glusterfs')
-rw-r--r--mod_glusterfs/lighttpd/1.4/mod_glusterfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c b/mod_glusterfs/lighttpd/1.4/mod_glusterfs.c
index 0fefd66..d565dce2 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;