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

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Jul 9 11:29:59 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:             07-09-2008 06:14 CDT
Last Modified:              07-09-2008 11:29 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.
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 07-09-08 11:29  
---------------------------------------------------------------------- 
Hi Patrick, thanks for the patch.

There are four places where you have added channel locking. The first
three are unnecessary since the channel will be locked prior to reaching
that point.

1. Lock added to try_suggested_sip_codec. The channel will be locked
either in sipsock_read or in ast_answer prior to reaching this point.
2 and 3. Locks added in get_refer_info and get_also_info. In both cases,
the channel is already locked in sipsock_read.

The final set of locks added in local_attended_transfer is necessary,
however there is a typo in the patch. Instead of unlocking the channels you
lock them again. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-09-08 11:29  putnopvut      Note Added: 0089959                          
======================================================================




More information about the asterisk-bugs mailing list