mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Make sure that we release the lock on the spyee channel if the spyee or spy has hung up
(closes issue #12232) Reported by: atis git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@109012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -250,8 +250,10 @@ static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chansp
|
|||||||
|
|
||||||
/* We now hold the channel lock on spyee */
|
/* We now hold the channel lock on spyee */
|
||||||
|
|
||||||
if (ast_check_hangup(chan) || ast_check_hangup(spyee))
|
if (ast_check_hangup(chan) || ast_check_hangup(spyee)) {
|
||||||
|
ast_channel_unlock(spyee);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
name = ast_strdupa(spyee->name);
|
name = ast_strdupa(spyee->name);
|
||||||
if (option_verbose >= 2)
|
if (option_verbose >= 2)
|
||||||
|
Reference in New Issue
Block a user