diff options
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_cfg_file.c | 2 | ||||
-rw-r--r-- | src/lua/lua_config.c | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/lua/lua_cfg_file.c b/src/lua/lua_cfg_file.c index 563fbb77b..a8e8dfbb8 100644 --- a/src/lua/lua_cfg_file.c +++ b/src/lua/lua_cfg_file.c @@ -213,7 +213,7 @@ rspamd_lua_post_load_config (struct rspamd_config *cfg) else { g_hash_table_insert (cfg->composite_symbols, sym, expr); rspamd_symbols_cache_add_symbol (cfg->cache, sym, - 1, 0, NULL, NULL, SYMBOL_TYPE_COMPOSITE, -1); + 0, NULL, NULL, SYMBOL_TYPE_COMPOSITE, -1); } } } diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index a1033543d..ea84f5532 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -920,7 +920,6 @@ rspamd_register_symbol_fromlua (lua_State *L, ret = rspamd_symbols_cache_add_symbol (cfg->cache, name, - weight, priority, lua_metric_symbol_callback, cd, @@ -1012,16 +1011,18 @@ lua_config_register_symbols (lua_State *L) while (lua_next (L, -2)) { lua_pushvalue (L, -2); sym = luaL_checkstring (L, -2); - rspamd_symbols_cache_add_symbol_virtual (cfg->cache, sym, - weight, ret); + rspamd_symbols_cache_add_symbol (cfg->cache, sym, + 0, NULL, NULL, + SYMBOL_TYPE_VIRTUAL, ret); lua_pop (L, 2); } lua_pop (L, 1); } else if (lua_type (L, i) == LUA_TSTRING) { sym = luaL_checkstring (L, i); - rspamd_symbols_cache_add_symbol_virtual (cfg->cache, sym, - weight, ret); + rspamd_symbols_cache_add_symbol (cfg->cache, sym, + 0, NULL, NULL, + SYMBOL_TYPE_VIRTUAL, ret); } } } @@ -1048,8 +1049,9 @@ lua_config_register_virtual_symbol (lua_State * L) } if (name) { - ret = rspamd_symbols_cache_add_symbol_virtual (cfg->cache, name, - weight, parent); + ret = rspamd_symbols_cache_add_symbol (cfg->cache, name, + 0, NULL, NULL, + SYMBOL_TYPE_VIRTUAL, parent); } } @@ -1257,7 +1259,7 @@ lua_config_add_composite (lua_State * L) if (new) { rspamd_symbols_cache_add_symbol (cfg->cache, name, - 1, 0, NULL, NULL, SYMBOL_TYPE_COMPOSITE, -1); + 0, NULL, NULL, SYMBOL_TYPE_COMPOSITE, -1); } ret = TRUE; |