Module: kamailio
Branch: master
Commit: a545a1ad3367fef4e8a5a4a4cd4f9157623f6cf9
URL:
https://github.com/kamailio/kamailio/commit/a545a1ad3367fef4e8a5a4a4cd4f915…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-07-15T14:50:30+02:00
Merge pull request #1187 from grumvalski/sockets_list_fix
core: build reply of core.sockets_list as an array
---
Modified: src/core/core_cmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a545a1ad3367fef4e8a5a4a4cd4f915…
Patch:
https://github.com/kamailio/kamailio/commit/a545a1ad3367fef4e8a5a4a4cd4f915…
---
diff --git a/src/core/core_cmd.c b/src/core/core_cmd.c
index b7e4b020bb..096ac82db9 100644
--- a/src/core/core_cmd.c
+++ b/src/core/core_cmd.c
@@ -920,7 +920,7 @@ static void core_sockets_list(rpc_t* rpc, void* c)
unsigned short proto;
proto=PROTO_UDP;
- rpc->add(c, "{", &hr);
+ rpc->add(c, "[", &hr);
do{
list=get_sock_info_list(proto);
for(si=list?*list:0; si; si=si->next){
@@ -991,7 +991,7 @@ static rpc_export_t core_rpc_methods[] = {
{"core.udp4_raw_info", core_udp4rawinfo, core_udp4rawinfo_doc,
0},
{"core.aliases_list", core_aliases_list, core_aliases_list_doc,
0},
- {"core.sockets_list", core_sockets_list, core_sockets_list_doc,
RET_ARRAY},
+ {"core.sockets_list", core_sockets_list, core_sockets_list_doc,
0},
#ifdef USE_DNS_CACHE
{"dns.mem_info", dns_cache_mem_info, dns_cache_mem_info_doc,
0 },