From: Vsevolod Stakhov Date: Wed, 5 Apr 2017 08:20:33 +0000 (+0100) Subject: [Minor] Fix headers_foreach invocation X-Git-Tag: 1.5.5~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0d33a57448b61167231b9bf999417a835d69d1bd;p=rspamd.git [Minor] Fix headers_foreach invocation --- diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c index 07c389e97..7f6ede7ef 100644 --- a/src/lua/lua_mimepart.c +++ b/src/lua/lua_mimepart.c @@ -985,7 +985,7 @@ lua_mimepart_headers_foreach (lua_State *L) lua_pushstring (L, hdr->name); rspamd_lua_push_header (L, hdr, full, raw); - if (lua_pcall (L, 3, 1, 0) != 0) { + if (lua_pcall (L, 2, 1, 0) != 0) { msg_err ("call to header_foreach failed: %s", lua_tostring (L, -1)); lua_pop (L, 1); diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 96eec1faf..a3f0bc212 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -4056,7 +4056,7 @@ lua_task_headers_foreach (lua_State *L) lua_pushstring (L, hdr->name); rspamd_lua_push_header (L, hdr, full, raw); - if (lua_pcall (L, 3, 1, 0) != 0) { + if (lua_pcall (L, 2, 1, 0) != 0) { msg_err_task ("call to header_foreach failed: %s", lua_tostring (L, -1)); lua_pop (L, 1);