[sr-dev] git:master:086a529e: app_python3: KEMI accept int-int-str for t_continue

AntonyA ascanio.alba7 at gmail.com
Wed Feb 28 06:37:49 CET 2018


Module: kamailio
Branch: master
Commit: 086a529e294f195161f807710d77cdccf210c17f
URL: https://github.com/kamailio/kamailio/commit/086a529e294f195161f807710d77cdccf210c17f

Author: AntonyA <ascanio.alba7 at gmail.com>
Committer: AntonyA <ascanio.alba7 at gmail.com>
Date: 2018-02-28T13:29:07+08:00

app_python3: KEMI accept int-int-str for t_continue

- t_continue() needs int-int-str arguments; enable in apy_kemi.c

---

Modified: src/modules/app_python3/apy_kemi.c

---

Diff:  https://github.com/kamailio/kamailio/commit/086a529e294f195161f807710d77cdccf210c17f.diff
Patch: https://github.com/kamailio/kamailio/commit/086a529e294f195161f807710d77cdccf210c17f.patch

---

diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c
index de342c2058..1c54a56800 100644
--- a/src/modules/app_python3/apy_kemi.c
+++ b/src/modules/app_python3/apy_kemi.c
@@ -268,6 +268,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,




More information about the sr-dev mailing list