From: Bogdan-Andrei Iancu <bogdan@opensips.org>
Date: Fri, 27 Oct 2017 18:57:11 +0300
Subject: [PATCH] Fix creating the profiles list in the dlg_list_ctx MI command
The profiles are not array, but list as they have different names for the nodes.Reported by Vladimir Dubov (@vovad)
Closes #1166
(cherry picked from commit 60d161d447ccf082aa1be7fbb2261c5548dcd3bf)
diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c
index 7938d4a5c..86d9f6af3 100644
--- a/modules/dialog/dlg_hash.c
+++ b/modules/dialog/dlg_hash.c
@@ -1286,7 +1286,7 @@ static inline int internal_mi_print_dlg(struct mi_node *rpl,
}
/* print dlg profiles */
if (dlg->profile_links) {
- node3 = add_mi_node_child(node1, MI_IS_ARRAY, "profiles", 8, 0, 0);
+ node3 = add_mi_node_child(node1, 0, "profiles", 8, 0, 0);
if(node3 == 0)
goto error;
for( dl=dlg->profile_links ; dl ; dl=dl->next) {