aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-03 17:02:51 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-03 17:02:51 +0100
commit6ea9d773ac6752ab040c38e83de8992c59365176 (patch)
treed61e5be2161d909572889b29aa8303a83c9f4729
parenta65d9460ee4bbeefc097268feb65c29a2d97d911 (diff)
downloadrspamd-6ea9d773ac6752ab040c38e83de8992c59365176.tar.gz
rspamd-6ea9d773ac6752ab040c38e83de8992c59365176.zip
Revert "[CritFix] Pre-filters and post-filters were completely broken"
This reverts commit 88c10484ff3802b59d8bcc7e9832e9fe97c9bb89.
-rw-r--r--src/lua/lua_config.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index 15733ec14..fb84c4988 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -671,6 +671,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;
@@ -743,6 +751,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;