From b1afa7079f4e7fbaef936e00d15acb5670b23744 Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 28 Apr 2026 10:29:33 +0300 Subject: [PATCH] nfqws2: timer_enum return only names --- lua/zapret-tests.lua | 4 ++-- nfq2/lua.c | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lua/zapret-tests.lua b/lua/zapret-tests.lua index fd098f4..9e4e351 100644 --- a/lua/zapret-tests.lua +++ b/lua/zapret-tests.lua @@ -938,9 +938,9 @@ function test_timer(opts) print("* timers\n") local timers=timer_enum() - for i,timer in ipairs(timers) do + for i,name in ipairs(timers) do print("TIMER "..i.." :") - timer_info_print(timer) + timer_info_print_by_name(name) end print() end diff --git a/nfq2/lua.c b/nfq2/lua.c index 12c97dd..09aa593 100644 --- a/nfq2/lua.c +++ b/nfq2/lua.c @@ -3856,12 +3856,6 @@ static int lua_push_timer_info(lua_State *L, const timer_pool *timer) lua_pushf_bool(L, "oneshot", timer->oneshot); lua_pushf_lint(L, "fires", timer->fires); } -static void lua_pushi_timer_info(lua_State *L, lua_Integer idx, const timer_pool *timer) -{ - lua_pushinteger(L, idx); - lua_push_timer_info(L, timer); - lua_rawset(L,-3); -} static int luacall_timer_info(lua_State *L) { // timer_del(name) @@ -3889,7 +3883,7 @@ static int luacall_timer_enum(lua_State *L) timer_pool *timer, *tmp, *p; lua_newtable(L); - HASH_ITER(hh, params.timers, timer, tmp) lua_pushi_timer_info(L, n++, timer); + HASH_ITER(hh, params.timers, timer, tmp) lua_pushi_str(L, n++, timer->str); LUA_STACK_GUARD_RETURN(L,1) }