[asterisk-commits] russell: branch 1.4 r104625 - /branches/1.4/apps/app_chanspy.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 27 11:33:05 CST 2008
Author: russell
Date: Wed Feb 27 11:33:04 2008
New Revision: 104625
URL: http://svn.digium.com/view/asterisk?view=rev&rev=104625
Log:
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:
branches/1.4/apps/app_chanspy.c
Modified: branches/1.4/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_chanspy.c?view=diff&rev=104625&r1=104624&r2=104625
==============================================================================
--- branches/1.4/apps/app_chanspy.c (original)
+++ branches/1.4/apps/app_chanspy.c Wed Feb 27 11:33:04 2008
@@ -538,6 +538,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;
@@ -633,7 +639,7 @@
peer = NULL;
}
}
- if (res == -1)
+ if (res == -1 || ast_check_hangup(chan))
break;
}
More information about the asterisk-commits
mailing list