소스 검색

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) {