[asterisk-bugs] [Asterisk 0013738]: [patch] Event processing sometimes hangs when using res_timing_pthread

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Dec 11 15:21:46 CST 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13738 
====================================================================== 
Reported By:                smurfix
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   13738
Category:                   Resources/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-10-18 15:12 CDT
Last Modified:              2008-12-11 15:21 CST
====================================================================== 
Summary:                    [patch] Event processing sometimes hangs when using
res_timing_pthread
Description: 
There's a bug in the pthread timing code which sometimes blocks event
processing.

Triggered thus:
* queue event to channel (DTMF for instance).
  pthread_timer_enable_continuous() gets called.
* Set an explicit rate (play dial tone). State switches to
TIMER_STATE_TICKING.
* Drop the rate (stop playing). State switches to TIMER_STATE_IDLE.
* Since the continuous timeout has thus been disabled, even though
  pthread_timer_disable_continuous() has never been called, the
unprocessed
  events (digits for overlap dialing) languish in the channel.

Fix:
* Setting an explicit rate just remembers the intended rate when the
  timer state is TIMER_STATE_CONTINUOUS.
* pthread_timer_disable_continuous() restores that rate.


Patch attached, probably applicable to 1.6.0 and trunk.
====================================================================== 

---------------------------------------------------------------------- 
 (0096261) svnbot (reporter) - 2008-12-11 15:21
 http://bugs.digium.com/view.php?id=13738#c96261 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 163241

U   trunk/res/res_timing_pthread.c

------------------------------------------------------------------------
r163241 | russell | 2008-12-11 15:21:45 -0600 (Thu, 11 Dec 2008) | 8 lines

Fix a problem where continuous mode will get inadvertently get turned off
if set_rate()
is used while continuous mode was already turned on.

(closes issue http://bugs.digium.com/view.php?id=13738)
Reported by: smurfix
Patches:
      res.patch.fixed uploaded by smurfix (license 547)

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-11 15:21 svnbot         Checkin                                      
2008-12-11 15:21 svnbot         Note Added: 0096261                          
2008-12-11 15:21 svnbot         Status                   assigned => resolved
2008-12-11 15:21 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list