Module: kamailio
Branch: master
Commit: 06989030f665d6387c1d9951318656fc6aabbc93
URL:
https://github.com/kamailio/kamailio/commit/06989030f665d6387c1d9951318656f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-11-11T12:28:41+01:00
core: added agname to sockets list rpc command output
---
Modified: src/core/core_cmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/06989030f665d6387c1d9951318656f…
Patch:
https://github.com/kamailio/kamailio/commit/06989030f665d6387c1d9951318656f…
---
diff --git a/src/core/core_cmd.c b/src/core/core_cmd.c
index f3bb16f2c47..b22e4c47ad4 100644
--- a/src/core/core_cmd.c
+++ b/src/core/core_cmd.c
@@ -940,10 +940,13 @@ static void core_sockets_list(rpc_t *rpc, void *c)
si->address_str.s);
for(ai = si->addr_info_lst; ai; ai = ai->next)
rpc->struct_add(ha, "ss", "address", ai->address_str.s);
- rpc->struct_add(ha, "ssss", "port", si->port_no_str.s,
"mcast",
- si->flags & SI_IS_MCAST ? "yes" : "no",
"mhomed",
- si->flags & SI_IS_MHOMED ? "yes" : "no",
"virtual",
- si->flags & SI_IS_VIRTUAL ? "yes" : "no");
+ rpc->struct_add(ha, "sssss", "port", si->port_no_str.s,
+ "agname",
+ (si->agroup.agname[0] != '\0') ? si->agroup.agname
+ : "none",
+ "mcast", si->flags & SI_IS_MCAST ? "yes" :
"no",
+ "mhomed", si->flags & SI_IS_MHOMED ? "yes" :
"no",
+ "virtual", si->flags & SI_IS_VIRTUAL ? "yes" :
"no");
} else {
printf(" %s: %s", get_proto_name(proto),
si->name.s);
@@ -951,10 +954,13 @@ static void core_sockets_list(rpc_t *rpc, void *c)
"proto", get_proto_name(proto), "address", si->name.s);
if(!(si->flags & SI_IS_IP))
rpc->struct_add(ha, "s", "ipaddress", si->address_str.s);
- rpc->struct_add(ha, "ssss", "port", si->port_no_str.s,
"mcast",
- si->flags & SI_IS_MCAST ? "yes" : "no",
"mhomed",
- si->flags & SI_IS_MHOMED ? "yes" : "no",
"virtual",
- si->flags & SI_IS_VIRTUAL ? "yes" : "no");
+ rpc->struct_add(ha, "sssss", "port", si->port_no_str.s,
+ "agname",
+ (si->agroup.agname[0] != '\0') ? si->agroup.agname
+ : "none",
+ "mcast", si->flags & SI_IS_MCAST ? "yes" :
"no",
+ "mhomed", si->flags & SI_IS_MHOMED ? "yes" :
"no",
+ "virtual", si->flags & SI_IS_VIRTUAL ? "yes" :
"no");
}
}
} while((proto = next_proto(proto)));