aboutsummaryrefslogtreecommitdiffstats
path: root/main/cli.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-13 05:48:10 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-13 05:48:10 +0000
commit503546a95baecea66fe46a3d224ad39a1ef3b36e (patch)
tree7f70638fc6d0dac088474472e719face91d4847e /main/cli.c
parent04b29acc66b27c26c51f1bb2ee44aeba9a22f89a (diff)
Fix an issue with console verbosity when running asterisk -rx to execute a command
and retrieve its output. The issue was that there was no way for the main Asterisk process to know that the remote console was connecting in the -rx mode. The way that James has fixed this is to have all remote consoles muted by default. Then, regular remote consoles automatically execute a CLI command to unmute themselves when they first start up. (closes issue #10847) Reported by: atis Patches: asterisk-consolemute.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85533 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/cli.c b/main/cli.c
index 826ed6f2a..83e5c71cf 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -402,9 +402,12 @@ static int handle_debuglevel_deprecated(int fd, int argc, char *argv[])
static int handle_logger_mute(int fd, int argc, char *argv[])
{
- if (argc != 2)
+ if (argc < 2 || argc > 3)
return RESULT_SHOWUSAGE;
- ast_console_toggle_mute(fd);
+ if (argc == 3 && !strcasecmp(argv[2], "silent"))
+ ast_console_toggle_mute(fd, 1);
+ else
+ ast_console_toggle_mute(fd, 0);
return RESULT_SUCCESS;
}