You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kamailio/debian/patches/sipwise/lcr_stats_flags_as_id.patch

32 lines
1.2 KiB

From: Sipwise Development Team <support@sipwise.com>
Date: Thu, 23 Nov 2023 10:13:39 +0100
Subject: lcr_stats_flags_as_id
---
src/modules/lcr/lcr_rpc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/modules/lcr/lcr_rpc.c b/src/modules/lcr/lcr_rpc.c
index 755fe58..45a3738 100644
--- a/src/modules/lcr/lcr_rpc.c
+++ b/src/modules/lcr/lcr_rpc.c
@@ -106,7 +106,8 @@ static void print_gw_stat(rpc_t *rpc, void *st, struct gw_info *gw)
{
str gw_name;
- rpc->struct_add(st, "d", "gw_id", gw->gw_id);
+ rpc->struct_add(st, "d", "gw_id", gw->flags);
+ rpc->struct_add(st, "d", "lcr_gw_id", gw->gw_id);
gw_name.s = gw->gw_name;
gw_name.len = gw->gw_name_len;
rpc->struct_add(st, "S", "gw_name", &gw_name);
@@ -560,7 +561,7 @@ static void lcr_print_stats(rpc_t *rpc, void *ctx)
}
#define CREATE_RPC_ENTRY(var1, var2) \
- snprintf(param, sizeof(param), "%s%u:%s = %lu", "gw", gw->gw_id, var1, \
+ snprintf(param, sizeof(param), "%s%u:%s = %lu", "gw", gw->flags, var1, \
var2); \
paramstr.s = param; \
paramstr.len = strlen(param); \