[sr-dev] git:master:778a7a68: msilo: exported functions to kemi framework

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 7 10:52:47 CET 2017


Module: kamailio
Branch: master
Commit: 778a7a68618cb1d148b929bd80db4113a0ca0f46
URL: https://github.com/kamailio/kamailio/commit/778a7a68618cb1d148b929bd80db4113a0ca0f46

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-12-07T10:52:15+01:00

msilo: exported functions to kemi framework

---

Modified: src/modules/msilo/msilo.c

---

Diff:  https://github.com/kamailio/kamailio/commit/778a7a68618cb1d148b929bd80db4113a0ca0f46.diff
Patch: https://github.com/kamailio/kamailio/commit/778a7a68618cb1d148b929bd80db4113a0ca0f46.patch

---

diff --git a/src/modules/msilo/msilo.c b/src/modules/msilo/msilo.c
index f62557ce2a..2f261d69bd 100644
--- a/src/modules/msilo/msilo.c
+++ b/src/modules/msilo/msilo.c
@@ -44,6 +44,7 @@
 #include "../../core/resolve.h"
 #include "../../core/usr_avp.h"
 #include "../../core/mod_fix.h"
+#include "../../core/kemi.h"
 
 #include "../../modules/tm/tm_load.h"
 
@@ -923,6 +924,14 @@ static int m_store_2(struct sip_msg* msg, char* owner, char* s2)
 	return m_store(msg, NULL);
 }
 
+/**
+ * store message
+ */
+static int ki_m_store(sip_msg_t* msg)
+{
+	return m_store(msg, NULL);
+}
+
 /**
  * dump message
  */
@@ -1182,6 +1191,14 @@ static int m_dump_2(struct sip_msg* msg, char* owner, char* s2)
 	return m_dump(msg, NULL);
 }
 
+/**
+ * dump message
+ */
+static int ki_m_dump(sip_msg_t* msg)
+{
+	return m_dump(msg, NULL);
+}
+
 /**
  * - cleaning up the messages that got reply
  * - delete expired messages from database
@@ -1601,3 +1618,38 @@ int check_message_support(struct sip_msg* msg)
 	return -1;
 }
 
+/**
+ *
+ */
+/* clang-format off */
+static sr_kemi_t sr_kemi_msilo_exports[] = {
+	{ str_init("msilo"), str_init("mstore"),
+		SR_KEMIP_INT, ki_m_store,
+		{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+	},
+	{ str_init("msilo"), str_init("mstore_uri"),
+		SR_KEMIP_INT, m_store,
+		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+	},
+	{ str_init("msilo"), str_init("mdump"),
+		SR_KEMIP_INT, ki_m_dump,
+		{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+	},
+	{ str_init("msilo"), str_init("mdump_uri"),
+		SR_KEMIP_INT, m_dump,
+		{ SR_KEMIP_STR, 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 } }
+};
+/* clang-format on */
+
+int mod_register(char *path, int *dlflags, void *p1, void *p2)
+{
+	sr_kemi_modules_add(sr_kemi_msilo_exports);
+	return 0;
+}
\ No newline at end of file




More information about the sr-dev mailing list