]> 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:17:43 +0000 (19:17 -0400)
commit3b94982b4f3ba24bdcf0827db31908391f7865e7
tree53b49f989df10392994522c6fa82de29af50b70d
parent7a85a947af3d5e5ddb8b482a04b860c0bf597632
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