]> 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:12 +0000 (12:11 -0600)
commit78d9bc8ef66e2d20925daf0eb597cf8a956e1029
treead50905496f0293bb2ee4c44f83cfe73c706bf9d
parent017a33c6499344a9e8dfc513d347182e498836a7
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