document dahdichanname option in doc/asterisk-conf.txt

make chan_dahdi read its configuration from zapata.conf if dahdichanname has been set to 'no'



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-08-13 20:33:47 +00:00
parent 1b6d4f92e9
commit d98254b147
2 changed files with 22 additions and 9 deletions

View File

@@ -11470,16 +11470,23 @@ static int setup_dahdi(int reload)
#endif
#ifdef HAVE_ZAPTEL
if (!(cfg = ast_config_load("zapata.conf"))) {
ast_log(LOG_ERROR, "Unable to load zapata.conf\n");
return 0;
}
int load_from_zapata_conf = 1;
#else
if (!(cfg = ast_config_load("chan_dahdi.conf"))) {
ast_log(LOG_ERROR, "Unable to load chan_dahdi.conf\n");
return 0;
}
int load_from_zapata_conf = (dahdi_chan_mode == CHAN_ZAP_MODE);
#endif
if (load_from_zapata_conf) {
if (!(cfg = ast_config_load("zapata.conf"))) {
ast_log(LOG_ERROR, "Unable to load zapata.conf\n");
return 0;
}
} else {
if (!(cfg = ast_config_load("chan_dahdi.conf"))) {
ast_log(LOG_ERROR, "Unable to load chan_dahdi.conf\n");
return 0;
}
}
/* It's a little silly to lock it, but we mind as well just to be sure */
ast_mutex_lock(&iflock);
#ifdef HAVE_PRI