[sr-dev] git:master:e3ea10cc: core: build reply of core.sockets_list as an array

grumvalski federico.cabiddu at gmail.com
Sat Jul 15 14:50:34 CEST 2017


Module: kamailio
Branch: master
Commit: e3ea10ccfcd94af0e7ce6908a1e378b4a9555b93
URL: https://github.com/kamailio/kamailio/commit/e3ea10ccfcd94af0e7ce6908a1e378b4a9555b93

Author: grumvalski <federico.cabiddu at gmail.com>
Committer: grumvalski <federico.cabiddu at gmail.com>
Date: 2017-07-15T09:03:03+02:00

core: build reply of core.sockets_list as an array

---

Modified: src/core/core_cmd.c

---

Diff:  https://github.com/kamailio/kamailio/commit/e3ea10ccfcd94af0e7ce6908a1e378b4a9555b93.diff
Patch: https://github.com/kamailio/kamailio/commit/e3ea10ccfcd94af0e7ce6908a1e378b4a9555b93.patch

---

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	},




More information about the sr-dev mailing list