Browse code

jsonrpcs: exported dispatch() function to kemi

(cherry picked from commit 08a9ed3d136c861f990e4f63c2c0544e08d9078d)

Daniel-Constantin Mierla authored on 16/11/2020 09:06:20
Showing 1 changed files
... ...
@@ -1227,7 +1227,7 @@ static void mod_destroy(void)
1227 1227
 /**
1228 1228
  *
1229 1229
  */
1230
-static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
1230
+static int ki_jsonrpcs_dispatch(sip_msg_t* msg)
1231 1231
 {
1232 1232
 	rpc_export_t* rpce;
1233 1233
 	jsonrpc_ctx_t* ctx;
... ...
@@ -1315,6 +1315,14 @@ send_reply:
1315 1315
 }
1316 1316
 
1317 1317
 
1318
+/**
1319
+ *
1320
+ */
1321
+static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
1322
+{
1323
+	return ki_jsonrpcs_dispatch(msg);
1324
+}
1325
+
1318 1326
 int jsonrpc_exec_ex(str *cmd, str *rpath)
1319 1327
 {
1320 1328
 	rpc_export_t* rpce;
... ...
@@ -1551,6 +1559,11 @@ static sr_kemi_xval_t* ki_jsonrpcs_response(sip_msg_t *msg)
1551 1559
  */
1552 1560
 /* clang-format off */
1553 1561
 static sr_kemi_t sr_kemi_jsonrpcs_exports[] = {
1562
+	{ str_init("jsonrpcs"), str_init("dispatch"),
1563
+		SR_KEMIP_INT, ki_jsonrpcs_dispatch,
1564
+		{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
1565
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
1566
+	},
1554 1567
 	{ str_init("jsonrpcs"), str_init("exec"),
1555 1568
 		SR_KEMIP_INT, ki_jsonrpcs_exec,
1556 1569
 		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,