[asterisk-bugs] [Asterisk 0013726]: [patch] chan_dahdi.c:3693: error: struct zt_params has no member named chan_alarms

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Oct 17 06:48:17 CDT 2008


The following issue has been UPDATED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13726 
====================================================================== 
Reported By:                tzafrir
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13726
Category:                   Channels/chan_dahdi
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 148257 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-17 06:47 CDT
Last Modified:              2008-10-17 06:48 CDT
====================================================================== 
Summary:                    [patch] chan_dahdi.c:3693: error: struct zt_params
has no member named chan_alarms
Description: 
The function get_alarms() in chan_dahdi as of asterisk 1.4.22 can
optionally check for channel alarms and not only span alarms. This uses an
interface that is present in all versions of DAHDI and newer versions of
Zaptel.

The configure script of Asterisk 1.4.22 checks versions of zaptel if they
have the member chan_alarms in struct zt_params and the function
get_alarms() will thus use the channel alarms code in two cases:

1. We use dahdi
2. We use Zaptel, but one new enough to have chan_alarms .

However the test in the code has two problems:

1. The test in configure.ac will always #define HAVE_ZAPTEL_CHANALARMS (if
this is Zaptel) - to either 1 (found) or 0 (not found). 
2. HAVE_DAHDI means "we have either Zaptel or DAHDI". Thus testing using
it will also be true if we have any version of Zaptel.

3. The same mistake as in (2) is done in a few other places in the code
that check for: #if defined(HAVE_ZAPTEL) || defined(HAVE_DAHDI)
Harmless, but still incorrect.

I include a patch suggested by qwell after an IRC discussion yesterday for
(1) and (2), as well as fixes for (3). I include a patch for configure.ac
alone to reduce the noise.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-17 06:48 tzafrir        Summary                  chan_dahdi.c:3693:
error: struct zt_params has no member named chan_alarms => [patch]
chan_dahdi.c:3693: error: struct zt_params has no member named chan_alarms
======================================================================




More information about the asterisk-bugs mailing list