[asterisk-commits] file: trunk r45067 - in /trunk: ./ apps/app_chanspy.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Oct 13 10:06:20 MST 2006


Author: file
Date: Fri Oct 13 12:06:19 2006
New Revision: 45067

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

................
r45066 | file | 2006-10-13 13:05:02 -0400 (Fri, 13 Oct 2006) | 10 lines

Merged revisions 45060 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r45060 | file | 2006-10-13 13:01:22 -0400 (Fri, 13 Oct 2006) | 2 lines

Turn on volume adjustment if it needs to be on (issue #8136 reported by mnicholson)

........

................

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

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

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?rev=45067&r1=45066&r2=45067&view=diff
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Fri Oct 13 12:06:19 2006
@@ -268,6 +268,12 @@
 	ast_mutex_init(&csth.spy.lock);
 	csth.volfactor = *volfactor;
 	set_volume(chan, &csth);
+	if (csth.volfactor) {
+		ast_set_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
+		csth.spy.read_vol_adjustment = csth.volfactor;
+		ast_set_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
+		csth.spy.write_vol_adjustment = csth.volfactor;
+	}
 	csth.fd = fd;
 	
 	if (start_spying(spyee, chan, &csth.spy)) {
@@ -359,6 +365,15 @@
 				ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
 			csth.volfactor = *volfactor;
 			set_volume(chan, &csth);
+			if (csth.volfactor) {
+				ast_set_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
+				csth.spy.read_vol_adjustment = csth.volfactor;
+				ast_set_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
+				csth.spy.write_vol_adjustment = csth.volfactor;
+			} else {
+				ast_clear_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
+				ast_clear_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
+			}
 		} else if (res >= '0' && res <= '9') {
 			inp[x++] = res;
 		}



More information about the asterisk-commits mailing list