[asterisk-bugs] [Asterisk 0013033]: [patch] Janitor project to add channel locks

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 6 12:56:15 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13033 
====================================================================== 
Reported By:                pputman
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13033
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 129342 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-07-09 06:14 CDT
Last Modified:              2008-08-06 12:56 CDT
====================================================================== 
Summary:                    [patch] Janitor project to add channel locks
Description: 
Uses ast_channel_lock and ast_channel_unlock to make chan_sip.c more
threadsafe.
====================================================================== 

---------------------------------------------------------------------- 
 (0091158) Corydon76 (administrator) - 2008-08-06 12:56
 http://bugs.digium.com/view.php?id=13033#c91158 
---------------------------------------------------------------------- 
Uh, well, here's two more problems with the patch:

1) the variable declaration is now no longer the first thing in a block,
which violates C99.

2) Locking two channels like this is a very dangerous operation.  You
could very well have introduced a deadlock.  When locking two channels
(which have no defined lock order), deadlock avoidance must be used. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-06 12:56 Corydon76      Note Added: 0091158                          
======================================================================




More information about the asterisk-bugs mailing list