[sr-dev] git:5.0:71876926: xmlrpc: fix handling the optional param spec on no more params

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 19 09:01:51 CEST 2017


Module: kamailio
Branch: 5.0
Commit: 71876926dd7add9f7423bda1aa4489933d8174ac
URL: https://github.com/kamailio/kamailio/commit/71876926dd7add9f7423bda1aa4489933d8174ac

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-10-19T09:00:21+02:00

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

(cherry picked from commit 9483efe6af26a2a8b08ee132e8ed2afe25e71cbc)

---

Modified: src/modules/xmlrpc/xmlrpc.c

---

Diff:  https://github.com/kamailio/kamailio/commit/71876926dd7add9f7423bda1aa4489933d8174ac.diff
Patch: https://github.com/kamailio/kamailio/commit/71876926dd7add9f7423bda1aa4489933d8174ac.patch

---

diff --git a/src/modules/xmlrpc/xmlrpc.c b/src/modules/xmlrpc/xmlrpc.c
index e40f32b485..7cce80090d 100644
--- a/src/modules/xmlrpc/xmlrpc.c
+++ b/src/modules/xmlrpc/xmlrpc.c
@@ -1525,7 +1525,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