Module: kamailio
Branch: master
Commit: a837f69aacc93c55f89a91bcbb0f1cfbe539ab7c
URL:
https://github.com/kamailio/kamailio/commit/a837f69aacc93c55f89a91bcbb0f1cf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-08-25T16:15:46+02:00
app_python3: implemented KSR.pv.gete(...)
---
Modified: src/modules/app_python3/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a837f69aacc93c55f89a91bcbb0f1cf…
Patch:
https://github.com/kamailio/kamailio/commit/a837f69aacc93c55f89a91bcbb0f1cf…
---
diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c
index 1e9fd23d48..cc7dfa6ccf 100755
--- a/src/modules/app_python3/apy_kemi.c
+++ b/src/modules/app_python3/apy_kemi.c
@@ -733,8 +733,10 @@ static sr_kemi_t _sr_apy_kemi_test[] = {
*/
PyObject *sr_apy_kemi_return_none_mode(int rmode)
{
- if(rmode) {
+ if(rmode==1) {
return sr_apy_kemi_return_str(NULL, "<<null>>", 8);
+ } else if(rmode==2) {
+ return sr_apy_kemi_return_str(NULL, "", 0);
} else {
return sr_apy_kemi_return_none();
}
@@ -818,6 +820,14 @@ static PyObject *sr_apy_kemi_f_pv_getw(PyObject *self, PyObject
*args)
return sr_apy_kemi_f_pv_get_mode(self, args, 1);
}
+/**
+ *
+ */
+static PyObject *sr_apy_kemi_f_pv_gete(PyObject *self, PyObject *args)
+{
+ return sr_apy_kemi_f_pv_get_mode(self, args, 2);
+}
+
/**
*
*/
@@ -1051,6 +1061,8 @@ static PyMethodDef _sr_apy_kemi_pv_Methods[] = {
NAME " - pv get value"},
{"getw", sr_apy_kemi_f_pv_getw, METH_VARARGS,
NAME " - pv get value or <<null>>"},
+ {"gete", sr_apy_kemi_f_pv_gete, METH_VARARGS,
+ NAME " - pv get value or <<null>>"},
{"seti", sr_apy_kemi_f_pv_seti, METH_VARARGS,
NAME " - pv set int value"},
{"sets", sr_apy_kemi_f_pv_sets, METH_VARARGS,