]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Revert "[CritFix] Pre-filters and post-filters were completely broken"
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 May 2016 16:02:51 +0000 (17:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 May 2016 16:02:51 +0000 (17:02 +0100)
This reverts commit 88c10484ff3802b59d8bcc7e9832e9fe97c9bb89.

src/lua/lua_config.c

index 15733ec1433d4f91b7d232ee4852fb564bf6525a..fb84c4988fa0fa66fe8890188e8a6841d1fbe5d0 100644 (file)
@@ -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;