Module: kamailio
Branch: master
Commit: 0ca711665e1299269ca2ca1e566af6e40749f22a
URL:
https://github.com/kamailio/kamailio/commit/0ca711665e1299269ca2ca1e566af6e…
Author: AnthonyA <ascanio.alba7(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-01T16:59:45+01:00
app_python: KEMI accept int-int-str for t_continue
- t_continue() needs int-int-str arguments; enable in apy_kemi.c
---
Modified: src/modules/app_python/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0ca711665e1299269ca2ca1e566af6e…
Patch:
https://github.com/kamailio/kamailio/commit/0ca711665e1299269ca2ca1e566af6e…
---
diff --git a/src/modules/app_python/apy_kemi.c b/src/modules/app_python/apy_kemi.c
index 6dba098ab7..9a683250de 100644
--- a/src/modules/app_python/apy_kemi.c
+++ b/src/modules/app_python/apy_kemi.c
@@ -265,6 +265,16 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int
idx)
}
LM_DBG("params[%d] for: %.*s are int-int-int: [%d] [%d] [%d]\n",
i, fname.len, fname.s, vps[0].n, vps[1].n, vps[2].n);
+ } else if(ket->ptypes[0]==SR_KEMIP_INT &&
ket->ptypes[1]==SR_KEMIP_INT
+ && ket->ptypes[2]==SR_KEMIP_STR) {
+ if(!PyArg_ParseTuple(args, "iis:kemi-param-nns",
&vps[0].n,
+ &vps[1].n, &vps[2].s.s)) {
+ LM_ERR("unable to retrieve int-int-str params
%d\n", i);
+ return sr_kemi_apy_return_false();
+ }
+ vps[2].s.len = strlen(vps[2].s.s);
+ LM_DBG("params[%d] for: %.*s are int-int-str: [%d] [%d]
[%.*s]\n", i,
+ fname.len, fname.s, vps[0].n, vps[1].n, vps[2].s.len,
vps[2].s.s);
} else if(ket->ptypes[0]==SR_KEMIP_INT && ket->ptypes[1]==SR_KEMIP_STR
&& ket->ptypes[2]==SR_KEMIP_INT) {
if(!PyArg_ParseTuple(args, "isi:kemi-param-nsn", &vps[0].n,