[sr-dev] git:master: xmlrpc(s): fix '*' rpc_scan handling
Andrei Pelinescu-Onciul
andrei at iptel.org
Mon Jul 13 18:05:36 CEST 2009
Module: sip-router
Branch: master
Commit: e792b7614aaa57ddf4482a23e21c959dd2f45f98
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e792b7614aaa57ddf4482a23e21c959dd2f45f98
Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date: Mon Jul 13 18:00:40 2009 +0200
xmlrpc(s): fix '*' rpc_scan handling
The '*' modifier (marking the next parameters as optional) was not
properly handled (the current input parameter was "eaten").
Reported-by: Juha Heinanen jh at tutpro com
---
modules_s/xmlrpc/xmlrpc.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules_s/xmlrpc/xmlrpc.c b/modules_s/xmlrpc/xmlrpc.c
index 56b2151..0de5145 100644
--- a/modules_s/xmlrpc/xmlrpc.c
+++ b/modules_s/xmlrpc/xmlrpc.c
@@ -1220,9 +1220,9 @@ static int rpc_scan(rpc_ctx_t* ctx, char* fmt, ...)
switch(*fmt) {
case '*': /* start of optional parameters */
modifiers++;
- /* no other action needed, for xmlrpc params are treated as
- optionals anyway */
- break;
+ read++;
+ fmt++;
+ continue; /* do not advance ctx->act-param */
case 'b': /* Bool */
case 't': /* Date and time */
case 'd': /* Integer */
More information about the sr-dev
mailing list