Преглед изворни кода

utils: exported functions to kemi framework

Daniel-Constantin Mierla пре 8 година
родитељ
комит
4f839fbf37
1 измењених фајлова са 24 додато и 0 уклоњено
  1. 24 0
      src/modules/utils/utils.c

+ 24 - 0
src/modules/utils/utils.c

@@ -44,6 +44,7 @@
 #include "../../core/resolve.h"
 #include "../../core/locking.h"
 #include "../../core/script_cb.h"
+#include "../../core/kemi.h"
 #include "../../core/mem/shm_mem.h"
 #include "../../lib/srdb1/db.h"
 
@@ -322,6 +323,29 @@ int utils_forward(struct sip_msg *msg, int id, int proto)
 	return ret;
 }
 
+/**
+ *
+ */
+/* clang-format off */
+static sr_kemi_t sr_kemi_utils_exports[] = {
+	{ str_init("utils"), str_init("xcap_auth_status"),
+		SR_KEMIP_INT, ki_xcap_auth_status,
+		{ SR_KEMIP_STR, SR_KEMIP_STR, 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_utils_exports);
+	return 0;
+}
 
 #ifdef MI_REMOVED
 /* FIFO functions */