]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Fix dependencies tracking for callback symbols
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 7 Feb 2017 12:39:29 +0000 (12:39 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 7 Feb 2017 12:39:29 +0000 (12:39 +0000)
src/libserver/symbols_cache.c

index f965798f54eb87221e6dfe8fcf6c5db67af16065..872b4dd6d3740c7f673ae969123e89c310586fff 100644 (file)
@@ -776,7 +776,7 @@ rspamd_symbols_cache_add_symbol (struct symbols_cache *cache,
        rspamd_mempool_add_destructor (cache->static_pool,
                        rspamd_ptr_array_free_hard, item->rdeps);
 
-       if (name != NULL && type != SYMBOL_TYPE_CALLBACK) {
+       if (name != NULL) {
                g_hash_table_insert (cache->items_by_symbol, item->symbol, item);
        }
 
@@ -1302,8 +1302,8 @@ rspamd_symbols_cache_check_symbol (struct rspamd_task *task,
                                rspamd_set_counter (item->cd, diff);
                        }
 
-                       rspamd_session_watch_stop (task->s);
                        pending_after = rspamd_session_events_pending (task->s);
+                       rspamd_session_watch_stop (task->s);
 
                        if (pending_before == pending_after) {
                                /* No new events registered */