From: Vsevolod Stakhov Date: Wed, 27 Apr 2016 12:31:36 +0000 (+0100) Subject: [Feature] Pass settings id to lua script from log helper X-Git-Tag: 1.3.0~619 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7d7fe81501175d67735bf8786bd3e2ae10adaed7;p=rspamd.git [Feature] Pass settings id to lua script from log helper --- diff --git a/src/log_helper.c b/src/log_helper.c index d46122b69..d01e102c6 100644 --- a/src/log_helper.c +++ b/src/log_helper.c @@ -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);