aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-05 21:24:08 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-05 21:24:08 +0000
commit0ced3ea47ee196def199b48e38d389f7751fb935 (patch)
tree65977e7ffe70ed96009ea2d8922b23ed646007b5
parentc45b0c963ef5996173c6b880b7927bb74da880e1 (diff)
Merged revisions 228189 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r228189 | jpeeler | 2009-11-05 15:23:06 -0600 (Thu, 05 Nov 2009) | 11 lines Fix the fix for chanspy option o In 224178, I assumed the uploaded patch was correct as it had received positive feedback. The flags were being checked in the incorrect location. Upon testing the fix this time it was also found that the flags from the dialplan weren't being copied to the chanspy_translation_helper. (closes issue #16167) Reported by: marhbere ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@228190 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_chanspy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index baac4e720..493ab6f72 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -201,7 +201,7 @@ static int spy_generate(struct ast_channel *chan, void *data, int len, int sampl
return -1;
}
- if (ast_test_flag(chan, OPTION_READONLY)) {
+ if (ast_test_flag(&csth->spy_audiohook, 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 {
@@ -297,6 +297,7 @@ static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chansp
ast_verb(2, "Spying on channel %s\n", name);
memset(&csth, 0, sizeof(csth));
+ ast_copy_flags(&csth.spy_audiohook, flags, AST_FLAGS_ALL);
ast_audiohook_init(&csth.spy_audiohook, AST_AUDIOHOOK_TYPE_SPY, "ChanSpy");