cur = LIST_NEXT (cur, next);
}
/* All done */
+ bufferevent_enable (task->bev, EV_WRITE);
+ evbuffer_drain (task->bev->output, EVBUFFER_LENGTH (task->bev->output));
+ process_statfiles (task);
return 1;
}
}
g_hash_table_destroy (cd.tokens);
g_hash_table_destroy (cd.metrics);
+
+ task->state = WRITE_REPLY;
}
static void
#include <perl.h> /* from the Perl distribution */
#include <glib.h>
+#include <event.h>
#include <gmime/gmime.h>
#include "util.h"
task->error_code = RSPAMD_FILTER_ERROR;
task->state = WRITE_ERROR;
}
- else if (r == 1) {
+ else if (r == 0) {
task->state = WAIT_FILTER;
}
else {
if (task->state == WRITE_ERROR || task->state == WRITE_REPLY) {
bufferevent_enable (bev, EV_WRITE);
bufferevent_disable (bev, EV_READ);
+ evbuffer_drain (bev->output, EVBUFFER_LENGTH (bev->output));
}
}
else {
struct sigaction signals;
int i;
-
worker->srv->pid = getpid ();
worker->srv->type = TYPE_WORKER;
event_init ();