diff options
author | Joshua Colp <jcolp@digium.com> | 2016-05-04 04:49:29 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-05-04 04:49:29 -0500 |
commit | 122895f8646031789c58abacc514367a7d1e68ee (patch) | |
tree | 258ee7d6150ba70fe08827fd527ce17880137112 /apps | |
parent | b5223a8cfc9f57a7cd12918aa84a1cceb61ea653 (diff) | |
parent | 0c9faaee47ec6c1c25201c1a51975d88382a90bd (diff) |
Merge "app_chanspy: fix audiohook options in non read-only mode"
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 400eed11a..df2deae3f 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -509,8 +509,10 @@ static struct ast_generator spygen = { static int start_spying(struct ast_autochan *autochan, const char *spychan_name, struct ast_audiohook *audiohook, struct ast_flags *flags) { ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan_name, ast_channel_name(autochan->chan)); - if(!ast_test_flag(flags, OPTION_READONLY)) { - ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC | AST_AUDIOHOOK_MUTE_WRITE); + if(ast_test_flag(flags, OPTION_READONLY)) { + ast_set_flag(audiohook, AST_AUDIOHOOK_MUTE_WRITE); + } else { + ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC); } if(ast_test_flag(flags, OPTION_LONG_QUEUE)) { ast_debug(9, "Using a long queue to store audio frames in spy audiohook\n"); |