Module: kamailio
Branch: 5.0
Commit: dc9efda1bb416874fd3fe4320326d067fa9fb0c0
URL:
https://github.com/kamailio/kamailio/commit/dc9efda1bb416874fd3fe4320326d06…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-10-19T09:00:10+02:00
jsonrpcs: fix handling the optional param spec on no more params
(cherry picked from commit 87d71619e7896d3d333bb6c15d4c00616add71a6)
---
Modified: src/modules/jsonrpcs/jsonrpcs_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dc9efda1bb416874fd3fe4320326d06…
Patch:
https://github.com/kamailio/kamailio/commit/dc9efda1bb416874fd3fe4320326d06…
---
diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c
index b30beafd55..2103f75dfc 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -648,7 +648,7 @@ static int jsonrpc_scan(jsonrpc_ctx_t* ctx, char* fmt, ...)
ctx->req_node = ctx->req_node->next;
}
/* error if there is still a scan char type and it is not optional */
- if(*fmt && mandatory_param==1)
+ if(*fmt && *fmt!='*' && mandatory_param==1)
goto error;
va_end(ap);