diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-03-17 14:21:14 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-03-17 14:21:14 +0000 |
commit | 2c67438ebe7eb2d49d80e2f06b8d8dad88ed88a5 (patch) | |
tree | 5a05c883d828793cd5f17e2ca92b1fc5ad75c566 | |
parent | b311134430ccce0d1e14ef5ab28e2321456b84af (diff) |
Merged revisions 109012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r109012 | mmichelson | 2008-03-17 09:18:26 -0500 (Mon, 17 Mar 2008) | 6 lines
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/trunk@109024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | apps/app_chanspy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 32d5e7c0b..ab056e0aa 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -275,8 +275,10 @@ static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chansp /* 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; + } name = ast_strdupa(spyee->name); ast_verb(2, "Spying on channel %s\n", name); |