Explorar o código

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 %!s(int64=16) %!d(string=hai) anos
pai
achega
fa12669847
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  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);