[Home]

Summary:ASTERISK-03947: [patch] ast_outgoing_* retains lock on sync > 1
Reporter:Anthony Minessale (anthm)Labels:
Date Opened:2005-04-16 14:47:37Date Closed:2008-01-15 15:31:50.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbx.c.diff
( 1) 4041.stable.patch.txt
Description:When sync == 1 in ast_outgoing_ app/exten the intended behaviour is to return asyncronously and lock the new channel it created and fills it into a pointer for you but when it's > 1 it waits for the app or exten to finish before returning but it's still locked meaning on cases where sync is > 1 you cannot walk the channels without an error becacuse it holds the lock and executes the exten or app with the channel locked still.



****** ADDITIONAL INFORMATION ******

Disclaimer on file
anthmct@yahoo.com
Comments:By: Mark Spencer (markster) 2005-04-16 22:53:12

Fixed in CVS head, thanks!

By: Michael Jerris (mikej) 2005-05-31 00:39:23

patch for stable, disclaimer on file.

By: Michael Jerris (mikej) 2005-05-31 00:58:18

oops... locked_channel is not in stable in: ast_pbx_outgoing_app.  Quick look looks like it just needs to be added to the function, and to the two calls in manager.c as &chan

By: Michael Jerris (mikej) 2005-06-02 00:11:18

Drumkilla:  Would you like me to add the param to ast_pbx_outgoing_app.  Not sure how you want to handle api changes in stable.  It is a fairly trivial change.

By: Russell Bryant (russell) 2005-07-07 16:48:02

Ok, I'm sorry it has taken me so long to respond to this.

After reviewing the code, there is no need to add the 'locked_channel' parameter to that function.  It is there so that the newly created channel chan be stored for use by the caller of the function.

In CVS HEAD, it is used to be able to include the uniqueid from the channel in a manager event.

The thing I want to figure out before deciding what to do with this is find out why in cvs head, the unlock was only called in the case where the caller of the function has provided a place for the newly created channel to be stored.  I have sent kevin an email about it, and I'll have this resolved once I get the chance to talk to him.

By: Russell Bryant (russell) 2005-07-11 18:00:17

After a couple months of this idling, I don't think anything needs to be changed in 1.0.  :)

By: Digium Subversion (svnbot) 2008-01-15 15:31:50.000-0600

Repository: asterisk
Revision: 5481

U   trunk/pbx.c

------------------------------------------------------------------------
r5481 | markster | 2008-01-15 15:31:50 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix locking issue (bug ASTERISK-3947)

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

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