Module: kamailio
Branch: master
Commit: 87d71619e7896d3d333bb6c15d4c00616add71a6
URL:
https://github.com/kamailio/kamailio/commit/87d71619e7896d3d333bb6c15d4c006…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-10-18T18:36:26+02:00
jsonrpcs: fix handling the optional param spec on no more params
---
Modified: src/modules/jsonrpcs/jsonrpcs_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/87d71619e7896d3d333bb6c15d4c006…
Patch:
https://github.com/kamailio/kamailio/commit/87d71619e7896d3d333bb6c15d4c006…
---
diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c
index cd99ad8a01..e2b4b80cb6 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -649,7 +649,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);