[sr-dev] git:kamailio_3.0: drouting: register MI commands

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 27 12:37:18 CET 2010


Module: sip-router
Branch: kamailio_3.0
Commit: c2f9d800c367d614411159c599f078fbcc0e311e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c2f9d800c367d614411159c599f078fbcc0e311e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Jan 27 12:33:26 2010 +0100

drouting: register MI commands

- the module didn't register the MI commands in mod init
- reported by Denis Putyato
(cherry picked from commit f12562923e580644f20ae964264747be849d1ce9)

---

 modules_k/drouting/drouting.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules_k/drouting/drouting.c b/modules_k/drouting/drouting.c
index 80284dc..e7817f9 100644
--- a/modules_k/drouting/drouting.c
+++ b/modules_k/drouting/drouting.c
@@ -45,7 +45,7 @@
 #include "../../resolve.h"
 #include "../../parser/parse_from.h"
 #include "../../parser/parse_uri.h"
-#include "../../mi/mi.h"
+#include "../../lib/kmi/mi.h"
 
 #include "dr_load.h"
 #include "prefix_tree.h"
@@ -268,7 +268,13 @@ static int dr_init(void)
 {
 	pv_spec_t avp_spec;
 
-	LM_INFO("Dynamic-Routing - initializing\n");
+	LM_INFO("DRouting - initializing\n");
+
+	if(register_mi_mod(exports.name, mi_cmds)!=0)
+	{
+		LM_ERR("failed to register MI commands\n");
+		return -1;
+	}
 
 	/* check the module params */
 	if (db_url.s==NULL || db_url.s[0]==0) {




More information about the sr-dev mailing list