[sr-dev] git:master:9483efe6: xmlrpc: fix handling the optional param spec on no more params

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 18 18:42:11 CEST 2017


Module: kamailio
Branch: master
Commit: 9483efe6af26a2a8b08ee132e8ed2afe25e71cbc
URL: https://github.com/kamailio/kamailio/commit/9483efe6af26a2a8b08ee132e8ed2afe25e71cbc

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-10-18T18:41:01+02:00

xmlrpc: fix handling the optional param spec on no more params

---

Modified: src/modules/xmlrpc/xmlrpc.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9483efe6af26a2a8b08ee132e8ed2afe25e71cbc.diff
Patch: https://github.com/kamailio/kamailio/commit/9483efe6af26a2a8b08ee132e8ed2afe25e71cbc.patch

---

diff --git a/src/modules/xmlrpc/xmlrpc.c b/src/modules/xmlrpc/xmlrpc.c
index d3689d3af1..2e7c644279 100644
--- a/src/modules/xmlrpc/xmlrpc.c
+++ b/src/modules/xmlrpc/xmlrpc.c
@@ -1533,7 +1533,13 @@ static int rpc_scan(rpc_ctx_t* ctx, char* fmt, ...)
 	f=(autoconvert?GET_X_AUTOCONV:0) |
 		(lflf2crlf?GET_X_LFLF2CRLF:0);
 	while(*fmt) {
-		if (!ctx->act_param) goto error;
+		if (!ctx->act_param) {
+			if(*fmt=='*') {
+				break;
+			} else {
+				goto error;
+			}
+		}
 		value = ctx->act_param->xmlChildrenNode;
 
 		switch(*fmt) {




More information about the sr-dev mailing list