diff options
author | Jeff Peeler <jpeeler@digium.com> | 2009-11-05 21:23:06 +0000 |
---|---|---|
committer | Jeff Peeler <jpeeler@digium.com> | 2009-11-05 21:23:06 +0000 |
commit | 6aaa119e84befc2b05bfeff5437f033dbca8d783 (patch) | |
tree | 87cb616861be41d1cdc6a5dbd8687192efa995e2 /apps/app_chanspy.c | |
parent | 45ad82fda399d8d398ccdc806942779b9266953a (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@228189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r-- | apps/app_chanspy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 3f0944fc9..b7b25c6b6 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -435,7 +435,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 { @@ -535,6 +535,7 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto spyer_name, 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"); |