]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Allow to add conditions for bayes symbol
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 28 Oct 2018 10:17:34 +0000 (10:17 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 28 Oct 2018 10:17:34 +0000 (10:17 +0000)
src/libserver/symbols_cache.c

index 1757951114a308a9082a9a2d3e2e11b381cbc408..bbaffa400d95017dc91ac7d1b821e03245d2ba8a 100644 (file)
@@ -912,11 +912,13 @@ rspamd_symbols_cache_add_symbol (struct symbols_cache *cache,
                 */
                if (item->type & SYMBOL_TYPE_COMPOSITE) {
                        item->id = cache->composites->len;
+                       item->specific.normal.condition_cb = -1;
                        g_ptr_array_add (cache->composites, item);
                }
                else if (item->type & SYMBOL_TYPE_CLASSIFIER) {
                        /* Treat it as virtual */
                        item->id = cache->virtual->len;
+                       item->specific.normal.condition_cb = -1;
                        g_ptr_array_add (cache->virtual, item);
                }
                else {