]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Load the proper channel configuration file based on which driver was detected.
authorJeff Peeler <jpeeler@digium.com>
Mon, 30 Jun 2008 23:11:16 +0000 (23:11 +0000)
committerJeff Peeler <jpeeler@digium.com>
Mon, 30 Jun 2008 23:11:16 +0000 (23:11 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@126680 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index f1c54460c555884b4ef45f59a8a32df9e345e01a..4e3871f8a816eab0b65f5def9f53bc65b4ce15b5 100644 (file)
@@ -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 */