[asterisk-commits] jrose: trunk r311198 - in /trunk: ./ apps/app_chanspy.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 17 14:05:48 CDT 2011


Author: jrose
Date: Thu Mar 17 14:05:42 2011
New Revision: 311198

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311198
Log:
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/
........

Modified:
    trunk/   (props changed)
    trunk/apps/app_chanspy.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=311198&r1=311197&r2=311198
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Thu Mar 17 14:05:42 2011
@@ -710,6 +710,7 @@
 		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 @@
 		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,




More information about the asterisk-commits mailing list