[asterisk-bugs] [Asterisk 0013480]: [patch] remove zap/dahdi-related code duplications with some #define-s

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Sep 14 18:32:53 CDT 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13480 
====================================================================== 
Reported By:                tzafrir
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13480
Category:                   General
Reproducibility:            N/A
Severity:                   tweak
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 142358 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-14 18:32 CDT
Last Modified:              2008-09-14 18:32 CDT
====================================================================== 
Summary:                    [patch] remove zap/dahdi-related code duplications
with some #define-s
Description: 
The following patch adds 2 different #define-d constants that are set
differently for Zaptel and for DAHDI (through DAHDI_COMPAT), and then 3
more common defined names,

It uses those to reduce code duplication regarding /dev/zap vs. /dev/dahdi
.

e.g.:

#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);

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-14 18:32 tzafrir        Asterisk Version          => SVN             
2008-09-14 18:32 tzafrir        SVN Branch (only for SVN checkouts, not tarball
releases) =>  1.4            
2008-09-14 18:32 tzafrir        SVN Revision (number only!) => 142358          
2008-09-14 18:32 tzafrir        Disclaimer on File?       => N/A             
======================================================================




More information about the asterisk-bugs mailing list