aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-30 23:11:16 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-30 23:11:16 +0000
commit061eebc873ddbcdb968e2691b2a90fdd0c6e45dc (patch)
tree441444f54af05529728f7808a469a5cef6a34f7c /channels
parent1dfd27958da5009c0fe93b97c2780e8161a4331f (diff)
Load the proper channel configuration file based on which driver was detected.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@126680 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index f1c54460c..4e3871f8a 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -11360,16 +11360,15 @@ static int setup_dahdi(int reload)
int dchannels[NUM_DCHANS];
#endif
+#ifdef HAVE_ZAPTEL
+ cfg = ast_config_load("zapata.conf");
+#else
cfg = ast_config_load(config);
-
- /* Error if we have no chan_dahdi config file... */
+#endif
+ /* Error if we have no config file... */
if (!cfg) {
- /* ...so try and load zapata.conf */
- cfg = ast_config_load("zapata.conf");
- if (!cfg) {
ast_log(LOG_ERROR, "Unable to load either config %s or zapata.conf\n", config);
return 0;
- }
}
/* It's a little silly to lock it, but we mind as well just to be sure */