Skip to content

Commit

Permalink
xmlrpc: add <value> tag to array elements
Browse files Browse the repository at this point in the history
- add call to `add_xmlrpc_reply(reply, &value_prefix)` to  `rpc_array_add` function
- add call to `add_xmlrpc_reply(reply, &value_suffix)` to  `rpc_array_add` function
  • Loading branch information
albertored committed Jul 11, 2017
1 parent 50e79b6 commit cfc6e36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/xmlrpc/xmlrpc.c
Expand Up @@ -1805,6 +1805,7 @@ static int rpc_array_add(struct rpc_struct* s, char* fmt, ...)

va_start(ap, fmt);
while(*fmt) {
if (add_xmlrpc_reply(reply, &value_prefix) < 0) goto err;
if (*fmt == '{' || *fmt == '[') {
void_ptr = va_arg(ap, void**);
p = new_rpcstruct(0, 0, s->reply, (*fmt=='[')?RET_ARRAY:0);
Expand All @@ -1822,6 +1823,7 @@ static int rpc_array_add(struct rpc_struct* s, char* fmt, ...)
} else {
if (print_value(reply, reply, *fmt, &ap) < 0) goto err;
}
if (add_xmlrpc_reply(reply, &value_suffix) < 0) goto err;
fmt++;
}

Expand Down

0 comments on commit cfc6e36

Please sign in to comment.