mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
(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: https://origsvn.digium.com/svn/asterisk/branches/1.4@165991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user