[asterisk-commits] mmichelson: trunk r67557 - /trunk/main/cli.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jun 5 15:59:36 MST 2007


Author: mmichelson
Date: Tue Jun  5 17:59:36 2007
New Revision: 67557

URL: http://svn.digium.com/view/asterisk?view=rev&rev=67557
Log:
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.


Modified:
    trunk/main/cli.c

Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?view=diff&rev=67557&r1=67556&r2=67557
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Tue Jun  5 17:59:36 2007
@@ -186,7 +186,7 @@
 
 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 atleast = 0;
 	int fd = a->fd;
@@ -217,9 +217,11 @@
 		return CLI_SHOWUSAGE;
 	if (!strcasecmp(argv[e->args - 2], "debug")) {
 		dst = &option_debug;
+		oldval = option_debug;
 		what = "Core debug";
 	} else {
 		dst = &option_verbose;
+		oldval = option_verbose;
 		what = "Verbosity";
 	}
 	if (argc == e->args && !strcasecmp(argv[e->args - 1], "off")) {



More information about the asterisk-commits mailing list