[asterisk-commits] jpeeler: branch 1.6.2 r224181 - in /branches/1.6.2: ./ apps/app_chanspy.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 15 10:58:35 CDT 2009


Author: jpeeler
Date: Thu Oct 15 10:58:30 2009
New Revision: 224181

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=224181
Log:
Merged revisions 224178 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r224178 | jpeeler | 2009-10-15 10:57:14 -0500 (Thu, 15 Oct 2009) | 11 lines
  
  Readd removed ability to allow listening to one side of the call in app_chanspy
  
  (Option o)
  
  (closes issue #15675)
  Reported by: john8675309
  Patches:
        issue15675patchtrunk.txt uploaded by dbrooks (license 790)
  Tested by: jgutierrez on users list:
   http://lists.digium.com/pipermail/asterisk-users/2009-October/239155.html
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/apps/app_chanspy.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/apps/app_chanspy.c?view=diff&rev=224181&r1=224180&r2=224181
==============================================================================
--- branches/1.6.2/apps/app_chanspy.c (original)
+++ branches/1.6.2/apps/app_chanspy.c Thu Oct 15 10:58:30 2009
@@ -370,7 +370,12 @@
 		return -1;
 	}
 
-	f = ast_audiohook_read_frame(&csth->spy_audiohook, samples, AST_AUDIOHOOK_DIRECTION_BOTH, AST_FORMAT_SLINEAR);
+	if (ast_test_flag(chan, OPTION_READONLY)) {
+		/* Option 'o' was set, so don't mix channel audio */
+		f = ast_audiohook_read_frame(&csth->spy_audiohook, samples, AST_AUDIOHOOK_DIRECTION_READ, AST_FORMAT_SLINEAR);
+	} else {
+		f = ast_audiohook_read_frame(&csth->spy_audiohook, samples, AST_AUDIOHOOK_DIRECTION_BOTH, AST_FORMAT_SLINEAR);
+	}
 
 	ast_audiohook_unlock(&csth->spy_audiohook);
 




More information about the asterisk-commits mailing list