Module: sip-router
Branch: master
Commit: bdaeb24dd8fbc3f2bb5db2c14d0ea9741efacb8c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bdaeb24…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Apr 23 17:32:36 2012 +0100
modules_k/rls: Fixed issues with new RLS MI command
- Renamed "cleanup" to "rls_cleanup" so it doesn't conflict with
the presence
MI command of the same name.
- I'd forgotton to register the MI commands in mod_init()
---
modules_k/rls/rls.c | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/modules_k/rls/rls.c b/modules_k/rls/rls.c
index 026b9b3..7e73a27 100644
--- a/modules_k/rls/rls.c
+++ b/modules_k/rls/rls.c
@@ -256,24 +256,24 @@ static param_export_t params[]={
};
static mi_export_t mi_cmds[] = {
- { "cleanup", mi_cleanup, 0, 0, mi_child_init},
+ { "rls_cleanup", mi_cleanup, 0, 0, mi_child_init},
{ 0, 0, 0, 0, 0}
};
/** module exports */
struct module_exports exports= {
- "rls", /* module name */
- DEFAULT_DLFLAGS, /* dlopen flags */
- cmds, /* exported functions */
- params, /* exported parameters */
- 0, /* exported statistics */
- mi_cmds, /* exported MI functions */
- 0, /* exported pseudo-variables */
- 0, /* extra processes */
- mod_init, /* module initialization function */
- 0, /* response handling function */
- (destroy_function) destroy, /* destroy function */
- child_init /* per-child init function */
+ "rls", /* module name */
+ DEFAULT_DLFLAGS, /* dlopen flags */
+ cmds, /* exported functions */
+ params, /* exported parameters */
+ 0, /* exported statistics */
+ mi_cmds, /* exported MI functions */
+ 0, /* exported pseudo-variables */
+ 0, /* extra processes */
+ mod_init, /* module initialization function */
+ 0, /* response handling function */
+ (destroy_function) destroy, /* destroy function */
+ child_init /* per-child init function */
};
/**
@@ -293,6 +293,12 @@ static int mod_init(void)
LM_DBG("start\n");
+ if (register_mi_mod(exports.name, mi_cmds)!=0)
+ {
+ LM_ERR("failed to register MI commands\n");
+ return -1;
+ }
+
if (dbmode <RLS_DB_DEFAULT || dbmode > RLS_DB_ONLY)
{
LM_ERR( "Invalid dbmode-set to default mode\n" );