]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix composites processing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 1 Dec 2017 07:43:58 +0000 (07:43 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 1 Dec 2017 07:44:28 +0000 (07:44 +0000)
src/libserver/composites.c
src/libserver/symbols_cache.c

index 3f74683ed73b07ed652b1ec5a49d040304749fe9..25ee4681174d8ab73cde86a98e4533ea1d82c41e 100644 (file)
@@ -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);
                        }
index 719f8aabd7824a89a2c72b2ba730be54e0d2af18..5307c44b65a9caa343f1f4c47b02f0b9383f8643 100644 (file)
@@ -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;