diff options
author | Joshua Colp <jcolp@digium.com> | 2006-10-13 17:06:19 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2006-10-13 17:06:19 +0000 |
commit | 74fc525792eb3c91c58c0501845f894295831473 (patch) | |
tree | 4acdf8b33313a6de542a81cef79e9955afaa3a4c /apps | |
parent | 1bc1f0f26788029d99ffa999b06b70824243a113 (diff) |
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)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index e001b4b33..2d6b8e2ff 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -268,6 +268,12 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int 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 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int 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; } |