]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Set ucl vars in rspamadm routines
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 25 Feb 2018 15:35:57 +0000 (15:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 25 Feb 2018 15:35:57 +0000 (15:35 +0000)
src/rspamadm/confighelp.c
src/rspamadm/corpus_test.c
src/rspamadm/fuzzy_convert.c
src/rspamadm/grep.c
src/rspamadm/rescore.c

index ac25cd18f85fb9b38ef6c5da4faefea4920900c3..8f208b80583ea473486f8c36de924f9469401151 100644 (file)
@@ -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) {
index 7e1aa40e988a3317bc996cae384a2cabd4ee00c9..b6918ae1aca95cd8e4f1dd23310de371be4051b1 100644 (file)
@@ -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);
index a65f3a39790f267fcbda5e666d6409801d45070d..40757d2e4de87e651c2ee840e585454d5d298fe2 100644 (file)
@@ -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),
index 309b1e769d930273a2b3e4dbc308ede015866f16..5474ecf46573ccc3976c196d9db4116d59d9b894 100644 (file)
@@ -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) {
index ba5619776d226e15d0c3fcf195f6fe06b38b611e..e0c69f13b2e10b6ca27bdd23e31407801b21ca0c 100644 (file)
@@ -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);