]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 75066 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Fri, 13 Jul 2007 20:15:30 +0000 (20:15 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 13 Jul 2007 20:15:30 +0000 (20:15 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75066 | mmichelson | 2007-07-13 15:10:39 -0500 (Fri, 13 Jul 2007) | 5 lines

Fixed an issue where chanspy flags were uninitialized if no options were passed.
What triggered this investigation was an IRC chat where some people's quiet flags were
set while others' weren't even though none of them had specified the q option.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75078 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_chanspy.c

index ff89ab5c808303c3c6af695174089bfd03608888..b848351966228e8726e17f2e47cd0c9d38986623 100644 (file)
@@ -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) {