Module: kamailio
Branch: master
Commit: 11fd23b7712393691ef13428b9aa3426e878d754
URL: 
https://github.com/kamailio/kamailio/commit/11fd23b7712393691ef13428b9aa3426e878d754

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2016-04-22T22:58:59+02:00

tmx: t_precheck_trans() exported to kemi

---

Modified: modules/tmx/tmx_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/11fd23b7712393691ef13428b9aa3426e878d754.diff
Patch: 
https://github.com/kamailio/kamailio/commit/11fd23b7712393691ef13428b9aa3426e878d754.patch

---

diff --git a/modules/tmx/tmx_mod.c b/modules/tmx/tmx_mod.c
index 41f9da2..e7f5d9f 100644
--- a/modules/tmx/tmx_mod.c
+++ b/modules/tmx/tmx_mod.c
@@ -36,6 +36,7 @@
 #include "../../modules/tm/tm_load.h"
 #include "../../lib/kcore/kstats_wrapper.h"
 #include "../../dset.h"
+#include "../../kemi.h"
 
 #include "t_var.h"
 #include "t_mi.h"
@@ -723,7 +724,7 @@ static int fixup_t_continue(void** param, int param_no)
 /**
  *
  */
-static int w_t_precheck_trans(sip_msg_t *msg, char *p1, char *p2)
+static int t_precheck_trans(sip_msg_t *msg)
 {
        int ret;
 
@@ -736,6 +737,14 @@ static int w_t_precheck_trans(sip_msg_t *msg, char *p1, 
char *p2)
 /**
  *
  */
+static int w_t_precheck_trans(sip_msg_t *msg, char *p1, char *p2)
+{
+       return t_precheck_trans(msg);
+}
+
+/**
+ *
+ */
 static int tmx_cfg_callback(sip_msg_t *msg, unsigned int flags, void *cbp)
 {
        if(flags&POST_SCRIPT_CB) {
@@ -855,3 +864,25 @@ unsigned long tmx_stats_rld_rcv_rpls(void)
 }
 
 #endif
+
+/**
+ *
+ */
+static sr_kemi_t sr_kemi_tmx_exports[] = {
+       { str_init("tmx"), str_init("t_precheck_trans"),
+               SR_KEMIP_INT, t_precheck_trans,
+               { 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_tmx_exports);
+       return 0;
+}


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to