diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-03 13:44:50 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-03 13:44:50 +0300 |
commit | 3ff032cf72164dc9aa8575c0a631f7c7b0079f46 (patch) | |
tree | 98a7b11bf70232a6c0825591957352f2d4acc9b9 /src/buffer.c | |
parent | f972cde13ca98f6ed992a288826467abf04c888a (diff) | |
download | rspamd-3ff032cf72164dc9aa8575c0a631f7c7b0079f46.tar.gz rspamd-3ff032cf72164dc9aa8575c0a631f7c7b0079f46.zip |
* New rspamd protocol (changed replies)
* Add ability to attach string lists to symbols
* Check destructors and do not add identical destructors (argument and function) to pool's destructors
* Remove 2 warnings when building with gmime22
* Attach url names to surbl symbols
* Fix bug with blocking on read (I think it is linux specific thought)
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c index 8883e314d..5864da382 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -122,7 +122,7 @@ write_buffers (int fd, rspamd_io_dispatcher_t *d) } static void -read_buffers (int fd, rspamd_io_dispatcher_t *d) +read_buffers (int fd, rspamd_io_dispatcher_t *d, gboolean skip_read) { ssize_t r; GError *err; @@ -150,7 +150,7 @@ read_buffers (int fd, rspamd_io_dispatcher_t *d) return; } } - else { + else if (!skip_read) { /* Try to read the whole buffer */ r = read (fd, d->in_buf->pos, BUFREMAIN (d->in_buf)); if (r == -1 && errno != EAGAIN) { @@ -213,7 +213,7 @@ read_buffers (int fd, rspamd_io_dispatcher_t *d) len = d->in_buf->data->len; if (d->policy != saved_policy) { msg_debug ("read_buffers: policy changed during callback, restart buffer's processing"); - read_buffers (fd, d); + read_buffers (fd, d, TRUE); return; } continue; @@ -239,7 +239,7 @@ read_buffers (int fd, rspamd_io_dispatcher_t *d) len = d->in_buf->data->len; if (d->policy != saved_policy) { msg_debug ("read_buffers: policy changed during callback, restart buffer's processing"); - read_buffers (fd, d); + read_buffers (fd, d, TRUE); return; } continue; @@ -282,7 +282,7 @@ dispatcher_cb (int fd, short what, void *arg) } break; case EV_READ: - read_buffers (fd, d); + read_buffers (fd, d, FALSE); break; } } |