Forráskód Böngészése

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

Daniel-Constantin Mierla 8 éve
szülő
commit
9483efe6af
1 módosított fájl, 7 hozzáadás és 1 törlés
  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) |
 	f=(autoconvert?GET_X_AUTOCONV:0) |
 		(lflf2crlf?GET_X_LFLF2CRLF:0);
 		(lflf2crlf?GET_X_LFLF2CRLF:0);
 	while(*fmt) {
 	while(*fmt) {
-		if (!ctx->act_param) goto error;
+		if (!ctx->act_param) {
+			if(*fmt=='*') {
+				break;
+			} else {
+				goto error;
+			}
+		}
 		value = ctx->act_param->xmlChildrenNode;
 		value = ctx->act_param->xmlChildrenNode;
 
 
 		switch(*fmt) {
 		switch(*fmt) {