Module: kamailio Branch: master Commit: 4952da77e3e72933ab0301d9362f7d105ae3b4cf URL: https://github.com/kamailio/kamailio/commit/4952da77e3e72933ab0301d9362f7d10...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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/4952da77e3e72933ab0301d9362f7d10... Patch: https://github.com/kamailio/kamailio/commit/4952da77e3e72933ab0301d9362f7d10...
---
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 } } };