From: Vsevolod Stakhov Date: Tue, 3 May 2016 17:42:18 +0000 (+0100) Subject: Revert "[CritFix] Pre-filters and post-filters were completely broken" X-Git-Tag: 1.2.7~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d61d916445a6739b41f0bc5fdc103d75863f0050;p=thirdparty%2Frspamd.git Revert "[CritFix] Pre-filters and post-filters were completely broken" This reverts commit 36bccebd24cd0b44f77536e80816b1b3dd93e5e2. --- diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index 2e5237a097..a6ede8efa4 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -644,6 +644,14 @@ rspamd_lua_call_post_filters (struct rspamd_task *task) struct rspamd_task **ptask; GList *cur; + if (task->checkpoint == NULL) { + task->checkpoint = GUINT_TO_POINTER (0x1); + } + else { + /* Do not process if done */ + return; + } + cur = task->cfg->post_filters; while (cur) { cd = cur->data; @@ -708,6 +716,14 @@ rspamd_lua_call_pre_filters (struct rspamd_task *task) struct rspamd_task **ptask; GList *cur; + if (task->checkpoint == NULL) { + task->checkpoint = GUINT_TO_POINTER (0x1); + } + else { + /* Do not process if done */ + return; + } + cur = task->cfg->pre_filters; while (cur) { cd = cur->data;