Module: kamailio
Branch: 5.4
Commit: c9ab7671bffdee3c775f6eb13cbd2363b6f5ecf3
URL:
https://github.com/kamailio/kamailio/commit/c9ab7671bffdee3c775f6eb13cbd236…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-11-19T13:28:08+01:00
jsonrpcs: exported dispatch() function to kemi
(cherry picked from commit 08a9ed3d136c861f990e4f63c2c0544e08d9078d)
---
Modified: src/modules/jsonrpcs/jsonrpcs_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c9ab7671bffdee3c775f6eb13cbd236…
Patch:
https://github.com/kamailio/kamailio/commit/c9ab7671bffdee3c775f6eb13cbd236…
---
diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c
index 6f3491b038..c3b8003046 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -1227,7 +1227,7 @@ static void mod_destroy(void)
/**
*
*/
-static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
+static int ki_jsonrpcs_dispatch(sip_msg_t* msg)
{
rpc_export_t* rpce;
jsonrpc_ctx_t* ctx;
@@ -1315,6 +1315,14 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
}
+/**
+ *
+ */
+static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
+{
+ return ki_jsonrpcs_dispatch(msg);
+}
+
int jsonrpc_exec_ex(str *cmd, str *rpath)
{
rpc_export_t* rpce;
@@ -1551,6 +1559,11 @@ static sr_kemi_xval_t* ki_jsonrpcs_response(sip_msg_t *msg)
*/
/* clang-format off */
static sr_kemi_t sr_kemi_jsonrpcs_exports[] = {
+ { str_init("jsonrpcs"), str_init("dispatch"),
+ SR_KEMIP_INT, ki_jsonrpcs_dispatch,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ str_init("jsonrpcs"), str_init("exec"),
SR_KEMIP_INT, ki_jsonrpcs_exec,
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,