From cfc6e364b4a9be95e2e7e48b1a8e5a86324b35f3 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Tue, 11 Jul 2017 14:09:11 +0200 Subject: [PATCH] xmlrpc: add tag to array elements - 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 --- src/modules/xmlrpc/xmlrpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/xmlrpc/xmlrpc.c b/src/modules/xmlrpc/xmlrpc.c index 3f1ff4798e6..ef1535cc880 100644 --- a/src/modules/xmlrpc/xmlrpc.c +++ b/src/modules/xmlrpc/xmlrpc.c @@ -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); @@ -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++; }