Found a bug where when "core set debug #" is used, the verbosity is read as the

old value instead of the old debug value, leading to an erroneous status message
after setting. This was purely a cosmetic issue and had no other underlying problems.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2007-06-05 22:59:36 +00:00
parent 52efde5c65
commit ca4ca779a9

View File

@@ -186,7 +186,7 @@ static char *handle_reload_deprecated(struct ast_cli_entry *e, int cmd, struct a
static char *handle_verbose(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) static char *handle_verbose(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{ {
int oldval = option_verbose; int oldval;
int newlevel; int newlevel;
int atleast = 0; int atleast = 0;
int fd = a->fd; int fd = a->fd;
@@ -217,9 +217,11 @@ static char *handle_verbose(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
return CLI_SHOWUSAGE; return CLI_SHOWUSAGE;
if (!strcasecmp(argv[e->args - 2], "debug")) { if (!strcasecmp(argv[e->args - 2], "debug")) {
dst = &option_debug; dst = &option_debug;
oldval = option_debug;
what = "Core debug"; what = "Core debug";
} else { } else {
dst = &option_verbose; dst = &option_verbose;
oldval = option_verbose;
what = "Verbosity"; what = "Verbosity";
} }
if (argc == e->args && !strcasecmp(argv[e->args - 1], "off")) { if (argc == e->args && !strcasecmp(argv[e->args - 1], "off")) {