]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stasis/app: don't lock an app before a call to send
authorKevin Harwell <kharwell@digium.com>
Mon, 27 Jan 2020 18:01:15 +0000 (12:01 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 30 Jan 2020 15:41:59 +0000 (09:41 -0600)
commit42c51263b9ec8a0bb349af39e28ff51ed3d682ee
treefd802eaa85ec2c0eb102d875f554ca75baab26ee
parent939e18d63eee6c228446c4b14021ba8940761574
stasis/app: don't lock an app before a call to send

Calling 'app_send' eventually calls the app's message handler. It's possible
for a handler to obtain a lock on another object, and then need/want to lock
the app object. If the caller of 'app_send' locks the app object prior to
calling then there's a potential for a deadlock, if another thread calls
'app_send' without locking.

This patch makes it so 'app_send' is not called with the app object locked in
the section of code doing such.

ASTERISK-28423 #close

Change-Id: I6767c6d0933c7db1b984018966eefca4c0638a27
(cherry picked from commit e103339f02f0445b8c77b1c3c6f7d1c80e37f675)
res/stasis/app.c