mirror of https://github.com/sipwise/kamailio.git
When invoking lcr.get_statistics and lcr.stats from kamcmd, print gateway "flags" field as "gw_id" instead of gw_id because "flags" reflects what it is reported in webui. Change-Id: I880d251657c3b0cb87327cb55ed4ce5e28ce027bmr12.0
parent
56240fcf40
commit
5fdb68a82d
@ -0,0 +1,21 @@
|
|||||||
|
--- a/src/modules/lcr/lcr_rpc.c
|
||||||
|
+++ b/src/modules/lcr/lcr_rpc.c
|
||||||
|
@@ -109,7 +109,8 @@ static void print_gw_stat(rpc_t *rpc, vo
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
@@ -558,7 +559,7 @@ static void lcr_print_stats(rpc_t *rpc,
|
||||||
|
}
|
||||||
|
|
||||||
|
#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); \
|
||||||
Loading…
Reference in new issue