]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Pass settings id to lua script from log helper
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 27 Apr 2016 12:31:36 +0000 (13:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 27 Apr 2016 12:31:36 +0000 (13:31 +0100)
src/log_helper.c

index d46122b69b81a092e25057d0b50bbc44a90387ab..d01e102c68e8e7056fc625a0893470f33c4b1947 100644 (file)
@@ -116,8 +116,9 @@ rspamd_log_helper_read (gint fd, short what, gpointer ud)
                                pcfg = lua_newuserdata (ctx->L, sizeof (*pcfg));
                                *pcfg = ctx->cfg;
                                rspamd_lua_setclass (ctx->L, "rspamd{config}", -1);
+                               lua_pushnumber (ctx->L, sm->settings_id);
 
-                               if (lua_pcall (ctx->L, 4, 0, 0) != 0) {
+                               if (lua_pcall (ctx->L, 5, 0, 0) != 0) {
                                        msg_err ("error executing log handler code: %s",
                                                        lua_tostring (ctx->L, -1));
                                        lua_pop (ctx->L, 1);