Module: kamailio
Branch: master
Commit: 571c9993bb42a1c22a575874f186cfef06af19e8
URL:
https://github.com/kamailio/kamailio/commit/571c9993bb42a1c22a575874f186cfe…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-02T10:51:28+01:00
mohqueue: handle return code for pv_parse_format()
---
Modified: src/modules/mohqueue/mohq_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/571c9993bb42a1c22a575874f186cfe…
Patch:
https://github.com/kamailio/kamailio/commit/571c9993bb42a1c22a575874f186cfe…
---
diff --git a/src/modules/mohqueue/mohq_funcs.c b/src/modules/mohqueue/mohq_funcs.c
index 161a1ba36c..50eb9bfca0 100644
--- a/src/modules/mohqueue/mohq_funcs.c
+++ b/src/modules/mohqueue/mohq_funcs.c
@@ -2238,7 +2238,10 @@ strcpy (&pfile [npos], pcall->pmohq->mohq_mohfile);
npos += strlen (&pfile [npos]);
str pMOH [1] = {{pfile, npos}};
pv_elem_t *pmodel;
-pv_parse_format (pMOH, &pmodel);
+if(pv_parse_format (pMOH, &pmodel)<0) {
+ LM_ERR("failed to parse pv format string\n");
+ return 0;
+}
cmd_function fn_stream = bserver ? pmod_data->fn_rtp_stream_s
: pmod_data->fn_rtp_stream_c;
mohq_debug (pcall->pmohq, "%sStarting RTP link for call (%s)",