Преглед изворни кода

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

Daniel-Constantin Mierla пре 8 година
родитељ
комит
9483efe6af
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      src/modules/xmlrpc/xmlrpc.c

+ 7 - 1
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) {