From: Vsevolod Stakhov Date: Wed, 3 Aug 2022 20:51:55 +0000 (+0100) Subject: [Minor] Use integer instead of number X-Git-Tag: 3.3~96 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2d73e42c2ac317b11c11a5a4f6487b9cb581d1be;p=rspamd.git [Minor] Use integer instead of number --- 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; }