Skip to content

Commit

Permalink
Fix ds_list MI command output.
Browse files Browse the repository at this point in the history
The values added to the MI tree must be either persistent, either duplicated into the tree.
Closes issue #243, reported by Ovidiu Sas.
  • Loading branch information
bogdan-iancu committed May 29, 2014
1 parent dd10969 commit dd788ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/dispatcher/dispatch.c
Expand Up @@ -1878,7 +1878,7 @@ int ds_print_mi_list(struct mi_node* rpl)

for(j=0; j<list->nr; j++)
{
node= add_mi_node_child(set_node, 0, "URI", 3,
node= add_mi_node_child(set_node, MI_DUP_VALUE, "URI", 3,
list->dlist[j].uri.s, list->dlist[j].uri.len);
if(node == NULL)
goto error;
Expand All @@ -1896,15 +1896,16 @@ int ds_print_mi_list(struct mi_node* rpl)
p = socket2str(list->dlist[j].sock, NULL, &len, 0);
if (p)
{
node1= add_mi_node_child(node, 0, "socket", 6, p, len);
node1= add_mi_node_child(node, MI_DUP_VALUE,
"socket", 6, p, len);
if(node1 == NULL)
goto error;
}
}

if (list->dlist[j].attrs.s)
{
node1= add_mi_node_child(node, 0, "attr", 4,
node1= add_mi_node_child(node, MI_DUP_VALUE, "attr", 4,
list->dlist[j].attrs.s, list->dlist[j].attrs.len);
if(node1 == NULL)
goto error;
Expand Down

0 comments on commit dd788ff

Please sign in to comment.