فهرست منبع

domain: 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 سال پیش
والد
کامیت
fa12669847
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      modules_k/domain/domain_mod.c

+ 7 - 1
modules_k/domain/domain_mod.c

@@ -144,10 +144,16 @@ struct module_exports exports = {
 
 static int mod_init(void)
 {
-        int i;
+	int i;
 
 	LM_DBG("Initializing\n");
 	
+	if(register_mi_mod(exports.name, mi_cmds)!=0)
+	{
+		LM_ERR("failed to register MI commands\n");
+		return -1;
+	}
+
 	db_url.len = strlen(db_url.s);
 	domain_table.len = strlen(domain_table.s);
 	domain_col.len = strlen(domain_col.s);