]> git.ipfire.org Git - thirdparty/asterisk.git/commit
parking: Use channel snapshot instead of channel.
authorJoshua Colp <jcolp@digium.com>
Tue, 12 Nov 2019 11:00:44 +0000 (07:00 -0400)
committerJoshua Colp <jcolp@digium.com>
Wed, 13 Nov 2019 23:21:30 +0000 (18:21 -0500)
commite924c5107c7bd27dfb63d8e14beb666224356773
tree4edecff054629f88acf3daafc2e8e9af06cde03b
parenta47cb71bb17d075fdb51634490292baeaa1cbf81
parking: Use channel snapshot instead of channel.

There exists a scenario where a thread can hold a lock on the
channels container while trying to lock a bridge. At the same
time another thread can hold the lock for said bridge while
attempting to retrieve a channel. This causes a deadlock.

This change fixes this scenario by retrieving a channel snapshot
instead of a channel, as information present in the snapshot
is all that is needed.

ASTERISK-28616

Change-Id: I68ceb1d62c7378addcd286e21be08a660a7cecf2
res/parking/parking_bridge.c