]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix headers_foreach invocation
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 5 Apr 2017 08:20:33 +0000 (09:20 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 5 Apr 2017 08:20:33 +0000 (09:20 +0100)
src/lua/lua_mimepart.c
src/lua/lua_task.c

index 07c389e97ed88dd4280dd6f488177d0968996a44..7f6ede7ef493a350ecb3f2d8bbee8679ae32fe52 100644 (file)
@@ -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);
index 96eec1faf96f4c5f2e1a50c65c867263855e6ddd..a3f0bc212a43bf813444d187c4f320be973fa7b9 100644 (file)
@@ -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);