Module: kamailio
Branch: master
Commit: 5f83e703422dadd39b6ba55ee9f6f798ee692755
URL:
https://github.com/kamailio/kamailio/commit/5f83e703422dadd39b6ba55ee9f6f79…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-07-11T15:17:21+02:00
Merge pull request #1183 from athonet-open/xmlrpc-array-value
xmlrpc: add <value> tag to array elements
---
Modified: src/modules/xmlrpc/xmlrpc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5f83e703422dadd39b6ba55ee9f6f79…
Patch:
https://github.com/kamailio/kamailio/commit/5f83e703422dadd39b6ba55ee9f6f79…
---
diff --git a/src/modules/xmlrpc/xmlrpc.c b/src/modules/xmlrpc/xmlrpc.c
index 3f1ff4798e..ef1535cc88 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++;
}