소스 검색

utils: export MI commands

- MI commands exported from mod_init
- MI API is now a library (lib/kmi), SR core does not call anymore
  register_mi_mod(...)
Daniel-Constantin Mierla 16 년 전
부모
커밋
fe64f7f4f4
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      modules_k/utils/utils.c

+ 6 - 0
modules_k/utils/utils.c

@@ -159,6 +159,12 @@ static void destroy_shmlock(void)
 /* Module initialization function */
 static int mod_init(void)
 {
+	if(register_mi_mod(exports.name, mi_cmds)!=0)
+	{
+		LM_ERR("failed to register MI commands\n");
+		return -1;
+	}
+
 	/* Initialize curl */
 	if (curl_global_init(CURL_GLOBAL_ALL)) {
 		LM_ERR("curl_global_init failed\n");