Module: kamailio
Branch: 5.1
Commit: fbea348d0b2a09a08a4a9de4e9ebf65f689d63c5
URL:
https://github.com/kamailio/kamailio/commit/fbea348d0b2a09a08a4a9de4e9ebf65…
Author: AnthonyA <ascanio.alba7(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-01T17:11:04+01:00
app_python: KEMI accept int-int-str for t_continue
- t_continue() needs int-int-str arguments; enable in apy_kemi.c
(cherry picked from commit 0ca711665e1299269ca2ca1e566af6e40749f22a)
---
Modified: src/modules/app_python/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fbea348d0b2a09a08a4a9de4e9ebf65…
Patch:
https://github.com/kamailio/kamailio/commit/fbea348d0b2a09a08a4a9de4e9ebf65…
---
diff --git a/src/modules/app_python/apy_kemi.c b/src/modules/app_python/apy_kemi.c
index e221c1d9ac..79e55e3da3 100644
--- a/src/modules/app_python/apy_kemi.c
+++ b/src/modules/app_python/apy_kemi.c
@@ -288,6 +288,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,