瀏覽代碼

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)
Daniel-Constantin Mierla 15 年之前
父節點
當前提交
82cba0db58
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      modules_k/drouting/drouting.c

+ 8 - 2
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) {