[asterisk-commits] mjordan: trunk r423642 - in /trunk: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Sep 20 20:16:07 CDT 2014
Author: mjordan
Date: Sat Sep 20 20:16:05 2014
New Revision: 423642
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423642
Log:
main/channel: Unlock channel in off-nominal path
In r423414 (13) / r423415 (trunk), an API call that determines if a format
capability structure is empty was added. This returns true if the format
capability structure is completely empty or "none". A check for this was added
in channel.c's set_format call. Unfortunately, when this check was true, it
returned from the function while still holding the channel lock. This caused
the CDR unit tests - which have a tendency to create channels with no formats -
to deadlock. Whoops.
This patch unlocks the channel on the off-nominal path.
........
Merged revisions 423641 from http://svn.asterisk.org/svn/asterisk/branches/13
Modified:
trunk/ (props changed)
trunk/main/channel.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.
Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=423642&r1=423641&r2=423642
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sat Sep 20 20:16:05 2014
@@ -5328,6 +5328,7 @@
cap_native = ast_channel_nativeformats(chan);
if (ast_format_cap_empty(cap_native)) {
+ ast_channel_unlock(chan);
ast_log(LOG_ERROR, "Unable to set format because channel %s supports no formats\n",
ast_channel_name(chan));
return -1;
More information about the asterisk-commits
mailing list