git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47359
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
return 0;
}
-
- misdn_cfg_init(max_ports);
+ if (misdn_cfg_init(max_ports)<0) {
+ ast_log(LOG_ERROR, "Unable to initialize mISDN Config System\n");
+ return 0;
+ }
+
g_config_initialized=1;
misdn_debug = (int *)malloc(sizeof(int) * (max_ports+1));
};
/* you must call misdn_cfg_init before any other function of this header file */
-void misdn_cfg_init(int max_ports);
+int misdn_cfg_init(int max_ports);
void misdn_cfg_reload(void);
void misdn_cfg_destroy(void);
ast_mutex_destroy(&config_mutex);
}
-void misdn_cfg_init (int this_max_ports)
+int misdn_cfg_init (int this_max_ports)
{
char config[] = "misdn.conf";
char *cat, *p;
if (!(cfg = AST_LOAD_CFG(config))) {
ast_log(LOG_WARNING,"no misdn.conf ?\n");
- return;
+ return -1;
}
misdn_cfg_lock();
misdn_cfg_unlock();
AST_DESTROY_CFG(cfg);
+
+ return 0;
}