aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-19 19:48:00 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-19 19:48:00 +0000
commitf2eeca3bed9fef3110ee1946504e3b382341d7fc (patch)
treef32d0af75adb1ba287d025ed312df096422a910a /res
parenta78774210ab8a62f2f675688748a02a227f67aef (diff)
(closes issue #13480)
Reported by: tzafrir Replace a bunch of if defined checks for Zaptel/DAHDI through several new defines in dahdi_compat.h. This removes a lot of code duplication. Example from bug: #ifdef HAVE_ZAPTEL fd = open("/dev/zap/pseudo", O_RDWR); #else fd = open("/dev/dahdi/pseudo", O_RDWR); #endif is replaced with: fd = open(DAHDI_FILE_PSEUDO, O_RDRW); git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165991 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_musiconhold.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 8bbf2ec67..ca2a0435a 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -923,11 +923,7 @@ static int moh_register(struct mohclass *moh, int reload)
#ifdef HAVE_DAHDI
/* Open /dev/zap/pseudo for timing... Is
there a better, yet reliable way to do this? */
-#ifdef HAVE_ZAPTEL
- moh->pseudofd = open("/dev/zap/pseudo", O_RDONLY);
-#else
- moh->pseudofd = open("/dev/dahdi/pseudo", O_RDONLY);
-#endif
+ moh->pseudofd = open(DAHDI_FILE_PSEUDO, O_RDONLY);
if (moh->pseudofd < 0) {
ast_log(LOG_WARNING, "Unable to open pseudo channel for timing... Sound may be choppy.\n");
} else {