From 3fc9ae7f9a254778374ace03e202466b7ddf82a6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 25 Feb 2018 15:35:57 +0000 Subject: [PATCH] [Minor] Set ucl vars in rspamadm routines --- src/rspamadm/confighelp.c | 2 +- src/rspamadm/corpus_test.c | 2 +- src/rspamadm/fuzzy_convert.c | 2 +- src/rspamadm/grep.c | 2 +- src/rspamadm/rescore.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rspamadm/confighelp.c b/src/rspamadm/confighelp.c index ac25cd18f..8f208b805 100644 --- a/src/rspamadm/confighelp.c +++ b/src/rspamadm/confighelp.c @@ -85,7 +85,7 @@ rspamadm_confighelp_show (struct rspamd_config *cfg, gint argc, gchar **argv, { rspamd_fstring_t *out; - rspamd_lua_set_path (cfg->lua_state, NULL, NULL); + rspamd_lua_set_path (cfg->lua_state, NULL, ucl_vars); out = rspamd_fstring_new (); if (json) { diff --git a/src/rspamadm/corpus_test.c b/src/rspamadm/corpus_test.c index 7e1aa40e9..b6918ae1a 100644 --- a/src/rspamadm/corpus_test.c +++ b/src/rspamadm/corpus_test.c @@ -101,7 +101,7 @@ rspamadm_corpus_test (gint argc, gchar **argv) } L = rspamd_lua_init (); - rspamd_lua_set_path(L, NULL, NULL); + rspamd_lua_set_path(L, NULL, ucl_vars); obj = ucl_object_typed_new (UCL_OBJECT); diff --git a/src/rspamadm/fuzzy_convert.c b/src/rspamadm/fuzzy_convert.c index a65f3a397..40757d2e4 100644 --- a/src/rspamadm/fuzzy_convert.c +++ b/src/rspamadm/fuzzy_convert.c @@ -109,7 +109,7 @@ rspamadm_fuzzyconvert (gint argc, gchar **argv) } L = rspamd_lua_init (); - rspamd_lua_set_path (L, NULL, NULL); + rspamd_lua_set_path (L, NULL, ucl_vars); obj = ucl_object_typed_new (UCL_OBJECT); ucl_object_insert_key (obj, ucl_object_fromstring (source_db), diff --git a/src/rspamadm/grep.c b/src/rspamadm/grep.c index 309b1e769..5474ecf46 100644 --- a/src/rspamadm/grep.c +++ b/src/rspamadm/grep.c @@ -115,7 +115,7 @@ rspamadm_grep (gint argc, gchar **argv) } L = rspamd_lua_init (); - rspamd_lua_set_path (L, NULL, NULL); + rspamd_lua_set_path (L, NULL, ucl_vars); obj = ucl_object_typed_new (UCL_OBJECT); if (string) { diff --git a/src/rspamadm/rescore.c b/src/rspamadm/rescore.c index ba5619776..e0c69f13b 100644 --- a/src/rspamadm/rescore.c +++ b/src/rspamadm/rescore.c @@ -117,7 +117,7 @@ rspamadm_rescore (gint argc, gchar **argv) { } L = rspamd_lua_init (); - rspamd_lua_set_path (L, NULL, NULL); + rspamd_lua_set_path (L, NULL, ucl_vars); obj = ucl_object_typed_new (UCL_OBJECT); -- 2.39.5