]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use integer instead of number
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 3 Aug 2022 20:51:55 +0000 (21:51 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 3 Aug 2022 20:51:55 +0000 (21:51 +0100)
src/lua/lua_task.c

index ed7ebcbea5757c54edeb524da50c186b4aec6192..b7a087103c43b555a4b50544c43fd388ce44f789 100644 (file)
@@ -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;
                        }