[asterisk-commits] file: branch 1.2 r45060 -
/branches/1.2/apps/app_chanspy.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Oct 13 10:01:23 MST 2006
Author: file
Date: Fri Oct 13 12:01:22 2006
New Revision: 45060
URL: http://svn.digium.com/view/asterisk?rev=45060&view=rev
Log:
Turn on volume adjustment if it needs to be on (issue #8136 reported by mnicholson)
Modified:
branches/1.2/apps/app_chanspy.c
Modified: branches/1.2/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_chanspy.c?rev=45060&r1=45059&r2=45060&view=diff
==============================================================================
--- branches/1.2/apps/app_chanspy.c (original)
+++ branches/1.2/apps/app_chanspy.c Fri Oct 13 12:01:22 2006
@@ -259,8 +259,12 @@
ast_mutex_init(&csth.spy.lock);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
- csth.spy.read_vol_adjustment = csth.volfactor;
- csth.spy.write_vol_adjustment = csth.volfactor;
+ 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)) {
@@ -306,8 +310,15 @@
ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
- csth.spy.read_vol_adjustment = csth.volfactor;
- csth.spy.write_vol_adjustment = csth.volfactor;
+ 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 == '*') {
break;
More information about the asterisk-commits
mailing list