Skip to content

Commit

Permalink
jsonrpcs: exported dispatch() function to kemi
Browse files Browse the repository at this point in the history
(cherry picked from commit 08a9ed3)
  • Loading branch information
miconda authored and henningw committed Dec 21, 2020
1 parent 164c4f1 commit 63022e0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/modules/jsonrpcs/jsonrpcs_mod.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1532,6 +1540,11 @@ static int ki_jsonrpcs_exec(sip_msg_t *msg, str *scmd)
*/
/* 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,
Expand Down

0 comments on commit 63022e0

Please sign in to comment.