[sr-dev] git:master:13c84b82: core: return aliases list as an array in core.aliases_list

grumvalski federico.cabiddu at gmail.com
Wed Jul 12 10:52:30 CEST 2017


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

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

core: return aliases list as an array in core.aliases_list

---

Modified: src/core/core_cmd.c

---

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

---

diff --git a/src/core/core_cmd.c b/src/core/core_cmd.c
index fadabf5a7f..b7e4b020bb 100644
--- a/src/core/core_cmd.c
+++ b/src/core/core_cmd.c
@@ -876,14 +876,16 @@ static const char* core_aliases_list_doc[] = {
 static void core_aliases_list(rpc_t* rpc, void* c)
 {
 	void *hr;
+	void *hs;
 	void *ha;
 	struct host_alias* a;
 
 	rpc->add(c, "{", &hr);
 	rpc->struct_add(hr, "s",
 			"myself_callbacks", is_check_self_func_list_set()?"yes":"no");
+	rpc->struct_add(hr, "[", "aliases", &hs);
 	for(a=aliases; a; a=a->next) {
-		rpc->struct_add(hr, "{", "alias", &ha);
+		rpc->struct_add(hs, "{", "alias", &ha);
 		rpc->struct_add(ha, "sS",
 				"proto",  proto2a(a->proto),
 				"address", &a->alias




More information about the sr-dev mailing list