mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +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:
@@ -744,11 +744,7 @@ struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_
|
||||
|
||||
#ifdef HAVE_DAHDI
|
||||
|
||||
#ifdef HAVE_ZAPTEL
|
||||
tmp->timingfd = open("/dev/zap/timer", O_RDWR);
|
||||
#else
|
||||
tmp->timingfd = open("/dev/dahdi/timer", O_RDWR);
|
||||
#endif
|
||||
tmp->timingfd = open(DAHDI_FILE_TIMER, O_RDWR);
|
||||
|
||||
if (tmp->timingfd > -1) {
|
||||
/* Check if timing interface supports new
|
||||
|
Reference in New Issue
Block a user