aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_chanspy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index ff89ab5c8..b84835196 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -605,7 +605,8 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPTION_PRIVATE))
ast_set_flag(&flags, OPTION_WHISPER);
- }
+ } else
+ ast_clear_flag(&flags, AST_FLAGS_ALL);
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
@@ -689,7 +690,8 @@ static int extenspy_exec(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPTION_PRIVATE))
ast_set_flag(&flags, OPTION_WHISPER);
- }
+ } else
+ ast_clear_flag(&flags, AST_FLAGS_ALL);
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {