[sr-dev] git:master:4952da77: jsonrpcs: exported exec function to KEMI also as execx
Daniel-Constantin Mierla
miconda at gmail.com
Mon Feb 25 08:46:25 CET 2019
Module: kamailio
Branch: master
Commit: 4952da77e3e72933ab0301d9362f7d105ae3b4cf
URL: https://github.com/kamailio/kamailio/commit/4952da77e3e72933ab0301d9362f7d105ae3b4cf
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-02-25T08:35:37+01:00
jsonrpcs: exported exec function to KEMI also as execx
- exec is a builtin in older versions of python and results in error
if used as a member of an object
- alternative:
jsonrpcs_exec = getattr(KSR.jsonrpc, "exec")
jsonrpcs_exec("...")
---
Modified: src/modules/jsonrpcs/jsonrpcs_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/4952da77e3e72933ab0301d9362f7d105ae3b4cf.diff
Patch: https://github.com/kamailio/kamailio/commit/4952da77e3e72933ab0301d9362f7d105ae3b4cf.patch
---
diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c
index a6c5616561..952b4b3081 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -1525,6 +1525,11 @@ static sr_kemi_t sr_kemi_jsonrpcs_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("jsonrpcs"), str_init("execx"),
+ SR_KEMIP_INT, ki_jsonrpcs_exec,
+ { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};
More information about the sr-dev
mailing list