summaryrefslogtreecommitdiffstats
path: root/src/libserver/rspamd_symcache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-18 09:57:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-18 09:57:04 +0100
commit3861c33f5dbca4eea6f0cd01f10cb8c778114f7b (patch)
tree7efdb9e239dba02633baa1fb185fed720a88eacb /src/libserver/rspamd_symcache.c
parentdc9fc682044bdc99a8c1a3db5912bd092349e81a (diff)
downloadrspamd-3861c33f5dbca4eea6f0cd01f10cb8c778114f7b.tar.gz
rspamd-3861c33f5dbca4eea6f0cd01f10cb8c778114f7b.zip
[Fix] More stages fixes
Diffstat (limited to 'src/libserver/rspamd_symcache.c')
-rw-r--r--src/libserver/rspamd_symcache.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index 71d3ab5e8..a484c738b 100644
--- a/src/libserver/rspamd_symcache.c
+++ b/src/libserver/rspamd_symcache.c
@@ -1940,6 +1940,7 @@ rspamd_symcache_process_symbols (struct rspamd_task *task,
gboolean all_done;
gint saved_priority;
enum rspamd_cache_savepoint_stage next;
+ gint next_task_stage;
guint start_events_pending;
g_assert (cache != NULL);
@@ -1962,7 +1963,8 @@ rspamd_symcache_process_symbols (struct rspamd_task *task,
checkpoint->pass = RSPAMD_CACHE_PASS_IDEMPOTENT;
}
- msg_debug_cache_task ("symbols processing stage at pass: %d", checkpoint->pass);
+ msg_debug_cache_task ("symbols processing stage at pass: %d, %d stage requested",
+ checkpoint->pass, stage);
start_events_pending = rspamd_session_events_pending (task->s);
switch (checkpoint->pass) {
@@ -1976,11 +1978,14 @@ rspamd_symcache_process_symbols (struct rspamd_task *task,
if (checkpoint->pass != RSPAMD_CACHE_PASS_PREFILTERS) {
sel = cache->prefilters_empty;
next = RSPAMD_CACHE_PASS_PREFILTERS;
+ next_task_stage = RSPAMD_TASK_STAGE_PRE_FILTERS;
checkpoint->pass = RSPAMD_CACHE_PASS_PREFILTERS_EMPTY;
}
else {
sel = cache->prefilters;
next = RSPAMD_CACHE_PASS_FILTERS;
+ checkpoint->pass = RSPAMD_CACHE_PASS_PREFILTERS;
+ next_task_stage = RSPAMD_TASK_STAGE_FILTERS;
}
@@ -2015,11 +2020,11 @@ rspamd_symcache_process_symbols (struct rspamd_task *task,
}
}
- if (all_done || stage == next) {
+ if (all_done || stage == next_task_stage) {
checkpoint->pass = next;
}
- if (stage == next) {
+ if (stage == next_task_stage) {
return rspamd_symcache_process_symbols (task, cache, stage);
}