aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-01 07:43:58 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-01 07:44:28 +0000
commit7c2b83ac6ea0e962e4da1887792f61ea9e17514b (patch)
tree1ae5d1244bbed405af45fee00cd98f01b65b23ff
parentbd7531d552c498cffba82bfa127a19309455681f (diff)
downloadrspamd-7c2b83ac6ea0e962e4da1887792f61ea9e17514b.tar.gz
rspamd-7c2b83ac6ea0e962e4da1887792f61ea9e17514b.zip
[Fix] Fix composites processing
-rw-r--r--src/libserver/composites.c4
-rw-r--r--src/libserver/symbols_cache.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libserver/composites.c b/src/libserver/composites.c
index 3f74683ed..25ee46811 100644
--- a/src/libserver/composites.c
+++ b/src/libserver/composites.c
@@ -285,7 +285,7 @@ composites_foreach_callback (gpointer key, gpointer value, void *data)
{
struct composites_data *cd = data;
struct rspamd_composite *comp = value;
- gint rc;
+ gdouble rc;
cd->composite = comp;
@@ -311,7 +311,7 @@ composites_foreach_callback (gpointer key, gpointer value, void *data)
setbit (cd->checked, comp->id * 2);
/* Result bit */
- if (rc) {
+ if (rc != 0) {
setbit (cd->checked, comp->id * 2 + 1);
rspamd_task_insert_result_single (cd->task, key, 1.0, NULL);
}
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c
index 719f8aabd..5307c44b6 100644
--- a/src/libserver/symbols_cache.c
+++ b/src/libserver/symbols_cache.c
@@ -1609,6 +1609,7 @@ rspamd_symbols_cache_process_symbols (struct rspamd_task * task,
RSPAMD_CACHE_PASS_POSTFILTERS) {
checkpoint->pass = RSPAMD_CACHE_PASS_POSTFILTERS;
}
+
if (stage == RSPAMD_TASK_STAGE_IDEMPOTENT && checkpoint->pass <
RSPAMD_CACHE_PASS_IDEMPOTENT) {
checkpoint->pass = RSPAMD_CACHE_PASS_IDEMPOTENT;