diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-06 21:56:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-06 21:56:13 +0100 |
commit | 1b5151533711e1c14f78c1e65c4902506b27ba1f (patch) | |
tree | 3387e5125e0d2e6e6e277fae946850ba32a55738 /src/libserver/cfg_rcl.c | |
parent | 37ad53dee0c78deaaef3cf15212a081c8b460bed (diff) | |
download | rspamd-1b5151533711e1c14f78c1e65c4902506b27ba1f.tar.gz rspamd-1b5151533711e1c14f78c1e65c4902506b27ba1f.zip |
[Minor] Fix runtime issues
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r-- | src/libserver/cfg_rcl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index b770e14ad..5cfd73ee3 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -880,6 +880,12 @@ rspamd_rcl_set_lua_globals (struct rspamd_config *cfg, lua_State *L, lua_setglobal (L, "rspamd_classifiers"); } + lua_getglobal (L, "classifiers"); + if (lua_isnil (L, -1)) { + lua_newtable (L); + lua_setglobal (L, "classifiers"); + } + lua_getglobal (L, "rspamd_version"); if (lua_isnil (L, -1)) { lua_pushcfunction (L, rspamd_rcl_lua_version); |