]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix enabled checks for symbols in cache
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 28 Feb 2017 13:01:01 +0000 (13:01 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 28 Feb 2017 13:01:01 +0000 (13:01 +0000)
src/libserver/symbols_cache.c

index cf016194563a6a52a32851f9813d84e99269fd60..59b0ab5d6430042219b35fe4d56a8a79b1c7b8eb 100644 (file)
@@ -1023,6 +1023,7 @@ rspamd_symbols_cache_validate_cb (gpointer k, gpointer v, gpointer ud)
 
                                msg_info_cache ("adding unknown symbol %s to metric %s", item->symbol,
                                                m->name);
+                               ghost = FALSE;
                        }
 
                        cur = g_list_next (cur);
@@ -2391,7 +2392,7 @@ rspamd_symbols_cache_is_symbol_enabled (struct rspamd_task *task,
 
        if (checkpoint) {
                if (isset (checkpoint->processed_bits, id * 2)) {
-                       return FALSE;
+                       ret = FALSE;
                }
                else {
                        if (item->condition_cb != -1) {
@@ -2412,10 +2413,8 @@ rspamd_symbols_cache_is_symbol_enabled (struct rspamd_task *task,
                                        lua_pop (L, 1);
                                }
                        }
-
-                       return ret;
                }
        }
 
-       return FALSE;
+       return ret;
 }