]> 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)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 14 Nov 2019 23:19:57 +0000 (17:19 -0600)
commite7320bbbf002595e3244daa3dad3868bfdd30992
tree08e226775b19827ca15f6fcae2be544f70d27807
parente3959a2fe19bc674cf219f5faa927d86a6d38c6f
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