[asterisk-bugs] [Asterisk 0013658]: WAITSTATUS will never get set for digitally muted channels

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Oct 14 14:58:44 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13658 
====================================================================== 
Reported By:                explidous
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   13658
Category:                   Applications/app_waitforsilence
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.4.22 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-09 15:46 CDT
Last Modified:              2008-10-14 14:58 CDT
====================================================================== 
Summary:                    WAITSTATUS will never get set for digitally muted
channels
Description: 
Basically line 110 in app_waitforsilence.c should be:

if (res < 0) { 

and line 116 should be :

if (res == 0) {

On line 110 it is checking to see if the result from ast_waitfor is less
than or equal to 0 if so it exits assuming the channel has hungup. If not
on line 116 it checks to see if the result is not true if so it assumes it
is a digitally muted channel and the wait lasted the appropriate period of
time. It then goes on to set the channel variable WAITSTATUS equal to
SILENCE. WAITSTATUS can never be set to SILENCE for a digitally muted
channel though because line 110 will caused the application to exit. The
interesting way that line 116 current checks to see if the result was 0
probably led to this in the first place.
====================================================================== 

---------------------------------------------------------------------- 
 (0093641) svnbot (reporter) - 2008-10-14 14:58
 http://bugs.digium.com/view.php?id=13658#c93641 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 149061

U   branches/1.4/apps/app_waitforsilence.c

------------------------------------------------------------------------
r149061 | tilghman | 2008-10-14 14:58:43 -0500 (Tue, 14 Oct 2008) | 6
lines

Check correct values in the return of ast_waitfor(); also, get rid of a
possible memory leak.
(closes issue http://bugs.digium.com/view.php?id=13658)
 Reported by: explidous
 Patch by: me

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

http://svn.digium.com/view/asterisk?view=rev&revision=149061 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-14 14:58 svnbot         Checkin                                      
2008-10-14 14:58 svnbot         Note Added: 0093641                          
======================================================================




More information about the asterisk-bugs mailing list