[sr-dev] git:tmp/k3.0_sr_backports: drouting: register MI commands

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Feb 1 12:32:31 CET 2010


Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: 82cba0db58e53a1b3d162d8d7ea21381942f9ab6
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=82cba0db58e53a1b3d162d8d7ea21381942f9ab6

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
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)
(cherry picked from commit c2f9d800c367d614411159c599f078fbcc0e311e)

---

 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