diff options
author | Jonathan Rose <jrose@digium.com> | 2011-03-17 19:05:42 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2011-03-17 19:05:42 +0000 |
commit | d956ecb96ea823d907490e64d1b9bccae9727b80 (patch) | |
tree | 7fc6eea3b46d7fd07abe1606a079d5be76f57267 /apps/app_chanspy.c | |
parent | 581bfad2f3206978e7c813ea5b44f196747a2734 (diff) |
Merged revisions 311197 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r311197 | jrose | 2011-03-17 14:03:34 -0500 (Thu, 17 Mar 2011) | 11 lines
This fixes a nasty chanspy bug which was causing a channel leak every time a spied on channel made a call.
In addition to the above, it makes certain channel destruction occurs so that applications don't get stuck waiting for datastore destruction while monitored by chanspy.
(closes issue #18742)
Reported by: jkister
Tested by: jkister, jcovert, jrose
Review: http://reviewboard.digium.internal/r/106/
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r-- | apps/app_chanspy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 274bb2202..994a03a18 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -710,6 +710,7 @@ static struct ast_autochan *next_channel(struct ast_channel_iterator *iter, struct ast_autochan *autochan, struct ast_channel *chan) { struct ast_channel *next; + struct ast_autochan *autochan_store; const size_t pseudo_len = strlen("DAHDI/pseudo"); if (!iter) { @@ -727,7 +728,10 @@ redo: goto redo; } - return ast_autochan_setup(next); + autochan_store = ast_autochan_setup(next); + ast_channel_unref(next); + + return autochan_store; } static int common_exec(struct ast_channel *chan, struct ast_flags *flags, |