commit ac4ad95: [Fix] Properly set config field when creating tasks from Lua

Vsevolod Stakhov vsevolod at rspamd.com
Fri Nov 10 13:49:08 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-11-09 17:53:02 +0000
URL: https://github.com/rspamd/rspamd/commit/ac4ad958a20dfc96e77c1dd302195737f4d1db45

[Fix] Properly set config field when creating tasks from Lua

---
 src/lua/lua_task.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 427314745..fe6e498c9 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -1847,7 +1847,7 @@ lua_task_create(lua_State *L)
 
 	if (lua_type(L, 1) == LUA_TUSERDATA) {
 		gpointer p;
-		p = rspamd_lua_check_udata_maybe(L, 2, "rspamd{config}");
+		p = rspamd_lua_check_udata_maybe(L, 1, "rspamd{config}");
 
 		if (p) {
 			cfg = *(struct rspamd_config **) p;


More information about the Commits mailing list