aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-24 19:55:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-24 19:56:05 +0100
commit25ef6b98215f5518dae638ce0fd6b4710f17b113 (patch)
tree3bd032e2097a3e65985bb10d1ae926498011086f /src/lua/lua_util.c
parentbb638f7c7d851f20071f5f9ee77224c0173e73ae (diff)
downloadrspamd-25ef6b98215f5518dae638ce0fd6b4710f17b113.tar.gz
rspamd-25ef6b98215f5518dae638ce0fd6b4710f17b113.zip
[Project] Rework rspamadm and Lua init path
Diffstat (limited to 'src/lua/lua_util.c')
-rw-r--r--src/lua/lua_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 6c200d1be..47b7106b6 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -626,7 +626,8 @@ lua_util_load_rspamd_config (lua_State *L)
cfg_name = luaL_checkstring (L, 1);
if (cfg_name) {
- cfg = rspamd_config_new ();
+ cfg = rspamd_config_new (RSPAMD_CONFIG_INIT_SKIP_LUA);
+ cfg->lua_state = L;
if (rspamd_config_read (cfg, cfg_name, NULL, NULL, NULL, NULL)) {
msg_err_config ("cannot load config from %s", cfg_name);
@@ -655,7 +656,8 @@ lua_util_config_from_ucl (lua_State *L)
if (obj) {
cfg = g_malloc0 (sizeof (struct rspamd_config));
- cfg = rspamd_config_new ();
+ cfg = rspamd_config_new (RSPAMD_CONFIG_INIT_SKIP_LUA);
+ cfg->lua_state = L;
cfg->rcl_obj = obj;
cfg->cache = rspamd_symbols_cache_new (cfg);