]> 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:41 +0000 (09:41 -0600)
commit2cacc1e7f872267228cbfb8179d6d07f8ba57feb
tree40b48f903b5b39e2f58fa19f3d888dbfacc03302
parent5def6d7e17b8163f4c9a4a8de7f85e4f96a26d4f
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 78d9bc8ef66e2d20925daf0eb597cf8a956e1029)
res/stasis/app.c