From 8147970509d06bececd6f20b45f0f8bd7d635a1f Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Fri, 14 Nov 2025 09:05:55 +0100 Subject: [PATCH] MT#63930 Add NGCPDlgCounters:list function The fuction has the scope to get the element of a redis list and return them back in form of a string. Change-Id: I721dfb67e537d8e42d21e0b564b2a7dc63bb9254 (cherry picked from commit 7548c5a8c586f5f47af70413c627f49ca7696401) --- ngcp/dlgcnt.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ngcp/dlgcnt.lua b/ngcp/dlgcnt.lua index 7766fb3..9064d0a 100644 --- a/ngcp/dlgcnt.lua +++ b/ngcp/dlgcnt.lua @@ -217,6 +217,15 @@ end KSR.dbg(string.format("central:get[%s]=>%s - %s\n", key, tostring(res), key)); return res; end + + function NGCPDlgCounters:list(key) + if not self.pair:test_connection() then + self.pair:connect() + end + local res = self.central.client:lrange(key, 0, -1); + KSR.dbg(string.format("central:list[%s]=>%s\n", key, utable.tostring(res))); + return utable.tostring(res); + end -- class return NGCPDlgCounters