summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-03 18:13:28 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-03 18:13:28 +0300
commit56379fcf26379a1588e3ca9ad4bdb1c7f370d2c7 (patch)
treedb67e8033ab548b55dac4cf68d245dcee0752684 /src/buffer.c
parent064948fca0ca6b579c4494c18223c1ea2d68208a (diff)
downloadrspamd-56379fcf26379a1588e3ca9ad4bdb1c7f370d2c7.tar.gz
rspamd-56379fcf26379a1588e3ca9ad4bdb1c7f370d2c7.zip
* Another fixes to synchronization of statfiles
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index d55b88d4d..ac0c43e21 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -208,6 +208,9 @@ read_buffers (int fd, rspamd_io_dispatcher_t * d, gboolean skip_read)
return;
}
/* Move remaining string to begin of buffer (draining) */
+ /* Reinit pointers as buffer may be changed */
+ len = &d->in_buf->data->len;
+ pos = &d->in_buf->pos;
memmove (d->in_buf->data->begin, c + 1, *len - r - 1);
b = d->in_buf->data->begin;
c = b;
@@ -236,6 +239,8 @@ read_buffers (int fd, rspamd_io_dispatcher_t * d, gboolean skip_read)
return;
}
/* Move remaining string to begin of buffer (draining) */
+ len = &d->in_buf->data->len;
+ pos = &d->in_buf->pos;
memmove (d->in_buf->data->begin, c, *len - r);
b = d->in_buf->data->begin;
c = b;