]> 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)
committerKevin Harwell <kharwell@digium.com>
Mon, 27 Jan 2020 18:11:21 +0000 (12:11 -0600)
commit737bd8365e09b7f4229a16662fc40583fb0a32bf
tree4194ffe761f069e38809c7f4a24d690864076c72
parentace97a3786544050899b20d6f022ae09cdf8d526
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
res/stasis/app.c