Skip to content

Commit

Permalink
mangler: updated to the new mod interface
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed Sep 28, 2018
1 parent 90a4a33 commit 75e21e6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/modules/mangler/Makefile
Expand Up @@ -9,6 +9,4 @@ auto_gen=
NAME=mangler.so
LIBS=

DEFS+=-DSER_MOD_INTERFACE

include ../../Makefile.modules
31 changes: 16 additions & 15 deletions src/modules/mangler/mangler.c
Expand Up @@ -85,28 +85,29 @@ static param_export_t params[] = {
*/
static cmd_export_t cmds[] =
{
{"sdp_mangle_ip", sdp_mangle_ip, 2,0, REQUEST_ROUTE|ONREPLY_ROUTE}, // fixup_char2str?
{"sdp_mangle_port",sdp_mangle_port, 1,0, REQUEST_ROUTE|ONREPLY_ROUTE},// fixup_char2int if I use an int as offset
{"encode_contact",encode_contact,2,0,REQUEST_ROUTE|ONREPLY_ROUTE},//fixup_char2str
{"decode_contact",decode_contact,0,0,REQUEST_ROUTE},
{"decode_contact_header",decode_contact_header,0,0,REQUEST_ROUTE|ONREPLY_ROUTE},
{0, 0, 0, 0, 0}
{"sdp_mangle_ip", sdp_mangle_ip, 2,0,0, REQUEST_ROUTE|ONREPLY_ROUTE}, // fixup_char2str?
{"sdp_mangle_port",sdp_mangle_port, 1,0,0, REQUEST_ROUTE|ONREPLY_ROUTE},// fixup_char2int if I use an int as offset
{"encode_contact",encode_contact,2,0,0,REQUEST_ROUTE|ONREPLY_ROUTE},//fixup_char2str
{"decode_contact",decode_contact,0,0,0,REQUEST_ROUTE},
{"decode_contact_header",decode_contact_header,0,0,0,REQUEST_ROUTE|ONREPLY_ROUTE},
{0, 0, 0, 0, 0, 0}
};


/*
* Module interface
*/
struct module_exports exports = {
"mangler",
cmds, /* Exported functions */
0, /* RPC methods */
params, /* Exported parameters */
mod_init, /* module initialization function */
0, /* response function */
destroy, /* destroy function */
0, /* oncancel function */
0 /* child initialization function */
"mangler", /* module name */
DEFAULT_DLFLAGS, /* dlopen flags */
cmds, /* cmd (cfg function) exports */
params, /* param exports */
0, /* RPC method exports */
0, /* pseudo-variables exports */
0, /* response handling function */
mod_init, /* module init function */
0, /* per-child init function */
destroy /* module destroy function */
};


Expand Down

0 comments on commit 75e21e6

Please sign in to comment.