Module: kamailio Branch: master Commit: 60e2777358fb7ea0a8eef0be2d5c4fb07f7e4acd URL: https://github.com/kamailio/kamailio/commit/60e2777358fb7ea0a8eef0be2d5c4fb0...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-04-17T20:27:01+02:00
xhttp: exported http reply function to kemi framework
---
Modified: src/modules/xhttp/xhttp_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/60e2777358fb7ea0a8eef0be2d5c4fb0... Patch: https://github.com/kamailio/kamailio/commit/60e2777358fb7ea0a8eef0be2d5c4fb0...
---
diff --git a/src/modules/xhttp/xhttp_mod.c b/src/modules/xhttp/xhttp_mod.c index 05b45c3..d104883 100644 --- a/src/modules/xhttp/xhttp_mod.c +++ b/src/modules/xhttp/xhttp_mod.c @@ -41,6 +41,7 @@ #include "../../core/sip_msg_clone.h" #include "../../core/mod_fix.h" #include "../../core/pvar.h" +#include "../../core/kemi.h"
#include "api.h" #include "xhttp_trans.h" @@ -168,10 +169,6 @@ static int mod_init(void) return 0; }
-int mod_register(char *path, int *dlflags, void *p1, void *p2) -{ - return register_trans_mod(path, mod_trans); -}
/** * @@ -517,4 +514,28 @@ int bind_xhttp(xhttp_api_t* api) return 0; }
-/** @} */ +/** + * + */ +/* clang-format off */ +static sr_kemi_t sr_kemi_xhttp_exports[] = { + { str_init("xhttp"), str_init("reply"), + SR_KEMIP_INT, xhttp_send_reply, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, + SR_KEMIP_STR, 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_xhttp_exports); + return register_trans_mod(path, mod_trans); +} + +/** @} */ \ No newline at end of file