[asterisk-commits] elguero: branch 1.8 r370952 - /branches/1.8/apps/app_chanspy.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 8 17:40:05 CDT 2012


Author: elguero
Date: Wed Aug  8 17:40:01 2012
New Revision: 370952

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370952
Log:
Fix Not Unreferencing A Spied Channel

When a channel hangs up while being spied upon and the option to exit the
ChanSpy application when the spied on channel hangs up is set,
ast_autochan_destroy is not being called and therefore a reference to the spied
upon channel is not removed.

The symptom being reported was that when using func_group in the dialplan and
calling "group show channels" at the cli, the spied upon channel was still
being shown while "core show channels" showed that the channel was not up.

This patch calls ast_autochan_destroy when a spied upon channel hangs up and
the option to exit the ChanSpy application is set, removing the reference to
the channel allowing the count for the group that the spied channel was part of
to be decremented.

(Fixes issue ASTERISK-17515)
Reported by: Arkadiusz Malka
Tested by: Alexandr Gordeev, Michael L. Young
Patches: 
    asterisk-17515-destroy-autochan.diff
                                    uploaded by Michael L. Young (license 5026)

Modified:
    branches/1.8/apps/app_chanspy.c

Modified: branches/1.8/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_chanspy.c?view=diff&rev=370952&r1=370951&r2=370952
==============================================================================
--- branches/1.8/apps/app_chanspy.c (original)
+++ branches/1.8/apps/app_chanspy.c Wed Aug  8 17:40:01 2012
@@ -1020,6 +1020,7 @@
 					}
 				}
 			} else if (res == 0 && ast_test_flag(flags, OPTION_EXITONHANGUP)) {
+				ast_autochan_destroy(autochan);
 				iter = ast_channel_iterator_destroy(iter);
 				goto exit;
 			}




More information about the asterisk-commits mailing list