diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-20 17:38:31 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-20 17:38:31 +0100 |
commit | d79e398a8b089c3268f4aaf3aff12fea888d5264 (patch) | |
tree | 3ca44a942a37617325d538c2dec6c1a36014435d /src/lua | |
parent | 7e081148fdf4fa81c7973037c07236e804296272 (diff) | |
download | rspamd-d79e398a8b089c3268f4aaf3aff12fea888d5264.tar.gz rspamd-d79e398a8b089c3268f4aaf3aff12fea888d5264.zip |
[Minor] Some fixes to ids propagation
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_config.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index 9b8c084c0..5c914af79 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -1524,6 +1524,17 @@ rspamd_register_symbol_fromlua (lua_State *L, ids = rspamd_process_id_list (allowed_ids, &nids); if (nids > 0) { + GString *dbg = g_string_new (""); + + for (guint i = 0; i < nids; i ++) { + rspamd_printf_gstring (dbg, "%ud,", ids[i]); + } + + dbg->len --; + + msg_debug_config ("allowed ids for %s are: %v", name, dbg); + g_string_free (dbg, TRUE); + rspamd_symcache_set_allowed_settings_ids (cfg->cache, name, ids, nids); @@ -1535,6 +1546,17 @@ rspamd_register_symbol_fromlua (lua_State *L, ids = rspamd_process_id_list (forbidden_ids, &nids); if (nids > 0) { + GString *dbg = g_string_new (""); + + for (guint i = 0; i < nids; i ++) { + rspamd_printf_gstring (dbg, "%ud,", ids[i]); + } + + dbg->len --; + + msg_debug_config ("forbidden ids for %s are: %v", name, dbg); + g_string_free (dbg, TRUE); + rspamd_symcache_set_forbidden_settings_ids (cfg->cache, name, ids, nids); @@ -2207,7 +2229,7 @@ lua_config_register_dependency (lua_State * L) if (child_id > 0 && parent != NULL) { rspamd_symcache_add_dependency (cfg->cache, child_id, parent, - child_id); + -1); } } else { |