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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 12 17:33:34 CDT 2014


Author: jrose
Date: Mon May 12 17:33:28 2014
New Revision: 413713

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413713
Log:
app_chanspy: Fix a test that was failing on account of r413551

ASTERISK-23381 #close
ASTERISK-23381 #comment Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/
........

Merged revisions 413710 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413712 from http://svn.asterisk.org/svn/asterisk/branches/12

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

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-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=413713&r1=413712&r2=413713
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Mon May 12 17:33:28 2014
@@ -725,16 +725,16 @@
 				bridge_connected = 1;
 			}
 
-			if (!bridge_connected) {
-				continue;
-			}
-
 			ast_audiohook_lock(&csth.whisper_audiohook);
-			ast_audiohook_lock(&csth.bridge_whisper_audiohook);
 			ast_audiohook_write_frame(&csth.whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
-			ast_audiohook_write_frame(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
 			ast_audiohook_unlock(&csth.whisper_audiohook);
-			ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+
+			if (bridge_connected) {
+				ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+				ast_audiohook_write_frame(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
+				ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+			}
+
 			ast_frfree(f);
 			continue;
 		} else if (ast_test_flag(flags, OPTION_WHISPER) && f->frametype == AST_FRAME_VOICE) {




More information about the asterisk-commits mailing list