]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix settings application
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 12 Jul 2016 15:39:34 +0000 (16:39 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 12 Jul 2016 15:39:34 +0000 (16:39 +0100)
src/libserver/symbols_cache.c
src/libserver/symbols_cache.h
src/lua/lua_task.c

index 11ecc3249da1e0dbc5276e09e10059e78f5ea075..4bed6ad3aa7c4c3b239b5017d641b1eb9589fd10 100644 (file)
@@ -1333,7 +1333,7 @@ rspamd_symbols_cache_make_checkpoint (struct rspamd_task *task,
        return checkpoint;
 }
 
-static gboolean
+gboolean
 rspamd_symbols_cache_process_settings (struct rspamd_task *task,
                struct symbols_cache *cache)
 {
@@ -1448,12 +1448,6 @@ rspamd_symbols_cache_process_symbols (struct rspamd_task * task,
                checkpoint = task->checkpoint;
        }
 
-       if (task->settings) {
-               if (rspamd_symbols_cache_process_settings (task, cache)) {
-                       return TRUE;
-               }
-       }
-
        msg_debug_task ("symbols processing stage at pass: %d", checkpoint->pass);
        start_events_pending = rspamd_session_events_pending (task->s);
 
index 2c7738ed2f6046a13fe2a1845f5be59f37d80c6a..1a4c0c3edd251cf7a8b29fbc3f707f5031036afb 100644 (file)
@@ -222,4 +222,13 @@ struct rspamd_abstract_callback_data* rspamd_symbols_cache_get_cbdata (
 gboolean rspamd_symbols_cache_set_cbdata (struct symbols_cache *cache,
                const gchar *symbol, struct rspamd_abstract_callback_data *cbdata);
 
+/**
+ * Process settings for task
+ * @param task
+ * @param cache
+ * @return
+ */
+gboolean rspamd_symbols_cache_process_settings (struct rspamd_task *task,
+               struct symbols_cache *cache);
+
 #endif
index 29f2f104691551a44ecb50b80e712ff82c7505c5..c7e446a24f3c2cc9d5f40f3c5fd10a19c88201b7 100644 (file)
@@ -2811,6 +2811,8 @@ lua_task_set_settings (lua_State *L)
                                }
                        }
                }
+
+               rspamd_symbols_cache_process_settings (task, task->cfg->cache);
        }
        else {
                return luaL_error (L, "invalid arguments");