Module: kamailio
Branch: master
Commit: d1ccbc11aeaab5fbd2c169458e95d09a48fbeed7
URL:
https://github.com/kamailio/kamailio/commit/d1ccbc11aeaab5fbd2c169458e95d09…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-08-29T11:21:56+02:00
sipjson: exported sj_serialize(...) to kemi framework
---
Modified: src/modules/sipjson/sipjson_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d1ccbc11aeaab5fbd2c169458e95d09…
Patch:
https://github.com/kamailio/kamailio/commit/d1ccbc11aeaab5fbd2c169458e95d09…
---
diff --git a/src/modules/sipjson/sipjson_mod.c b/src/modules/sipjson/sipjson_mod.c
index 7c0069e105..1c210223a6 100644
--- a/src/modules/sipjson/sipjson_mod.c
+++ b/src/modules/sipjson/sipjson_mod.c
@@ -346,4 +346,27 @@ static int sj_serialize_data(sip_msg_t* msg, srjson_doc_t *jdoc, str*
smode)
error:
return -1;
+}
+
+/**
+ *
+ */
+/* clang-format off */
+static sr_kemi_t sr_kemi_sipjson_exports[] = {
+ { str_init("sipjson"), str_init("sj_serialize"),
+ SR_KEMIP_INT, ki_sj_serialize,
+ { 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_sipjson_exports);
+ return 0;
}
\ No newline at end of file