[asterisk-bugs] [Zaptel 0013813]: zt_ctl_ioctl() ZT_SET_DIALPARAMS issue

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Nov 21 14:14:15 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13813 
====================================================================== 
Reported By:                ys
Assigned To:                
====================================================================== 
Project:                    Zaptel
Issue ID:                   13813
Category:                   General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Zaptel Version:              SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 4571 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-30 13:38 CDT
Last Modified:              2008-11-21 14:14 CST
====================================================================== 
Summary:                    zt_ctl_ioctl() ZT_SET_DIALPARAMS issue
Description: 
I think, that this in zt_ctl_ioctl (kernel/zaptel-base.c):

case ZT_SET_DIALPARAMS:
...

if ((tdp.dtmf_tonelen <= 4000) || (tdp.dtmf_tonelen >= 10)) {
                        global_dialparams.dtmf_tonelen =
tdp.dtmf_tonelen;
}
if ((tdp.mfv1_tonelen <= 4000) || (tdp.mfv1_tonelen >= 10)) {
                        global_dialparams.mfv1_tonelen =
tdp.mfv1_tonelen;
}
if ((tdp.mfr2_tonelen <= 4000) || (tdp.mfr2_tonelen >= 10)) {
                        global_dialparams.mfr2_tonelen =
tdp.mfr2_tonelen;
}
...

May be logical || (OR) need to be replaced to && (AND) ???


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

---------------------------------------------------------------------- 
 (0095296) svnbot (reporter) - 2008-11-21 14:14
 http://bugs.digium.com/view.php?id=13813#c95296 
---------------------------------------------------------------------- 
Repository: zaptel
Revision: 4586

U   branches/1.4/kernel/zaptel-base.c

------------------------------------------------------------------------
r4586 | qwell | 2008-11-21 14:14:14 -0600 (Fri, 21 Nov 2008) | 5 lines

Fix a think-o in numeric comparison.  Swap order to make it more clear.

(closes issue http://bugs.digium.com/view.php?id=13813)
Reported by: ys

------------------------------------------------------------------------

http://svn.digium.com/view/zaptel?view=rev&revision=4586 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-11-21 14:14 svnbot         Checkin                                      
2008-11-21 14:14 svnbot         Note Added: 0095296                          
======================================================================




More information about the asterisk-bugs mailing list