summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-19 19:12:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-19 19:12:12 +0100
commit4424324ba00d4dff20d66e7f544ea1cef3cea43b (patch)
tree9f1a94f7b8a2a49a0c945051ca276d902ac0a3a0 /src/lua
parentafb5bf3cbf718f231e344947ce5fd3d660961139 (diff)
downloadrspamd-4424324ba00d4dff20d66e7f544ea1cef3cea43b.tar.gz
rspamd-4424324ba00d4dff20d66e7f544ea1cef3cea43b.zip
[Minor] Fix task creation
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 94d4c05dc..ca55609a7 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -1226,7 +1226,12 @@ lua_task_load_from_file (lua_State * L)
if (fname) {
if (lua_type (L, 2) == LUA_TUSERDATA) {
- cfg = rspamd_lua_check_udata_maybe (L, 2, "rspamd{config}");
+ gpointer p;
+ p = rspamd_lua_check_udata_maybe (L, 2, "rspamd{config}");
+
+ if (p) {
+ cfg = *(struct rspamd_config **)p;
+ }
}
map = rspamd_file_xmap (fname, PROT_READ, &sz, TRUE);