[sr-dev] git:master:5a45ba14: rtjson: exported functions to kemi

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 10 12:26:43 CEST 2016


Module: kamailio
Branch: master
Commit: 5a45ba14d84eb73fa847887209a26d17c5357447
URL: https://github.com/kamailio/kamailio/commit/5a45ba14d84eb73fa847887209a26d17c5357447

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-06-10T12:26:25+02:00

rtjson: exported functions to kemi

---

Modified: modules/rtjson/rtjson_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5a45ba14d84eb73fa847887209a26d17c5357447.diff
Patch: https://github.com/kamailio/kamailio/commit/5a45ba14d84eb73fa847887209a26d17c5357447.patch

---

diff --git a/modules/rtjson/rtjson_mod.c b/modules/rtjson/rtjson_mod.c
index 963ae34..de07d58 100644
--- a/modules/rtjson/rtjson_mod.c
+++ b/modules/rtjson/rtjson_mod.c
@@ -28,6 +28,7 @@
 #include "../../sr_module.h"
 #include "../../dprint.h"
 #include "../../mod_fix.h"
+#include "../../kemi.h"
 
 #include "rtjson_routing.h"
 
@@ -168,3 +169,40 @@ static int w_rtjson_update_branch(sip_msg_t *msg, char *p1, char *p2)
 
 	return 1;
 }
+
+/**
+ *
+ */
+static sr_kemi_t sr_kemi_rtjson_exports[] = {
+	{ str_init("rtjson"), str_init("init_routes"),
+		SR_KEMIP_INT, rtjson_init_routes,
+		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+	},
+	{ str_init("rtjson"), str_init("push_routes"),
+		SR_KEMIP_INT, rtjson_push_routes,
+		{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+	},
+	{ str_init("rtjson"), str_init("next_route"),
+		SR_KEMIP_INT, rtjson_next_route,
+		{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+	},
+	{ str_init("rtjson"), str_init("update_branch"),
+		SR_KEMIP_INT, rtjson_update_branch,
+		{ SR_KEMIP_NONE, 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 } }
+};
+
+/**
+ *
+ */
+int mod_register(char *path, int *dlflags, void *p1, void *p2)
+{
+	sr_kemi_modules_add(sr_kemi_rtjson_exports);
+	return 0;
+}




More information about the sr-dev mailing list