From 2d73e42c2ac317b11c11a5a4f6487b9cb581d1be Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 3 Aug 2022 21:51:55 +0100 Subject: [PATCH] [Minor] Use integer instead of number --- src/lua/lua_task.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index ed7ebcbea..b7a087103 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -2296,7 +2296,7 @@ lua_task_set_pre_result (lua_State * L) } if (lua_type (L, 6) == LUA_TNUMBER) { - priority = lua_tonumber (L, 6); + priority = lua_tointeger(L, 6); } if (lua_type (L, 7) == LUA_TSTRING) { @@ -2338,6 +2338,10 @@ lua_task_set_pre_result (lua_State * L) } if (fl_str != NULL) { + /* + * TODO: convert to a set of string and split by `,` + add table support + * once this legacy code is migrated to C++ + */ if (strstr (fl_str, "least") != NULL) { flags |= RSPAMD_PASSTHROUGH_LEAST; } -- 2.39.5