]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/channel: Unlock channel in off-nominal path
authorMatthew Jordan <mjordan@digium.com>
Sun, 21 Sep 2014 01:15:40 +0000 (01:15 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sun, 21 Sep 2014 01:15:40 +0000 (01:15 +0000)
commitd85e59a23b773e5860353ea5c3ca1813a2913c3e
tree9d38d2a0bab3f499ef498eb6c1fe9fc79357d37d
parentf48d3f849d5dc34f50bdf7239ab5dca2ffdf9d0b
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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/channel.c