[asterisk-commits] russell: trunk r104643 - in /trunk: ./ apps/app_chanspy.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 27 11:36:51 CST 2008


Author: russell
Date: Wed Feb 27 11:36:50 2008
New Revision: 104643

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104643
Log:
Merged revisions 104625 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104625 | russell | 2008-02-27 11:33:04 -0600 (Wed, 27 Feb 2008) | 4 lines

Fix a problem in ChanSpy where it could get stuck in an infinite loop without
being able to detect that the calling channel hung up.
(closes issue #12076, reported by junky, patched by me)

........

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

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

Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=104643&r1=104642&r2=104643
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Wed Feb 27 11:36:50 2008
@@ -610,6 +610,12 @@
 				break;
 			}
 
+			if (ast_check_hangup(chan)) {
+				ast_channel_unlock(peer);
+				chanspy_ds_free(peer_chanspy_ds);
+				break;
+			}
+
 			if (peer == chan) {
 				ast_channel_unlock(peer);
 				continue;
@@ -738,6 +744,8 @@
 				peer = NULL;
 			}
 		}
+		if (res == -1 || ast_check_hangup(chan))
+			break;
 	}
 exit:
 




More information about the asterisk-commits mailing list