From: Juliana Fajardini Date: Mon, 26 Jul 2021 12:24:02 +0000 (+0100) Subject: util-lua-common: use lua_pushinteger w/ int values X-Git-Tag: suricata-5.0.8~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be9967b1b6d4a5bf4635f77853e033c9e9af1259;p=thirdparty%2Fsuricata.git util-lua-common: use lua_pushinteger w/ int values replace lua_pushnumber with lua_pushinteger for SCFlowStats and SCRuleIds. (cherry picked from commit 9b6ce274877ca825dbcbda0a7e540660004b5390) --- diff --git a/src/util-lua-common.c b/src/util-lua-common.c index e9675a5a76..1a6f84097d 100644 --- a/src/util-lua-common.c +++ b/src/util-lua-common.c @@ -493,9 +493,9 @@ static int LuaCallbackAppLayerProtoFlow(lua_State *luastate) */ static int LuaCallbackStatsPushToStackFromFlow(lua_State *luastate, const Flow *f) { - lua_pushnumber(luastate, f->todstpktcnt); + lua_pushinteger(luastate, f->todstpktcnt); lua_pushnumber(luastate, f->todstbytecnt); - lua_pushnumber(luastate, f->tosrcpktcnt); + lua_pushinteger(luastate, f->tosrcpktcnt); lua_pushnumber(luastate, f->tosrcbytecnt); return 4; } @@ -557,9 +557,9 @@ static int LuaCallbackFlowId(lua_State *luastate) */ static int LuaCallbackRuleIdsPushToStackFromPacketAlert(lua_State *luastate, const PacketAlert *pa) { - lua_pushnumber (luastate, pa->s->id); - lua_pushnumber (luastate, pa->s->rev); - lua_pushnumber (luastate, pa->s->gid); + lua_pushinteger(luastate, pa->s->id); + lua_pushinteger(luastate, pa->s->rev); + lua_pushinteger(luastate, pa->s->gid); return 3; }