[asterisk-commits] mvanbaak: branch group/cli_cleanup r145014 - /team/group/cli_cleanup/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 27 18:32:15 CDT 2008


Author: mvanbaak
Date: Sat Sep 27 18:32:15 2008
New Revision: 145014

URL: http://svn.digium.com/view/asterisk?view=rev&rev=145014
Log:
misd updates

Modified:
    team/group/cli_cleanup/channels/chan_misdn.c

Modified: team/group/cli_cleanup/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/cli_cleanup/channels/chan_misdn.c?view=diff&rev=145014&r1=145013&r2=145014
==============================================================================
--- team/group/cli_cleanup/channels/chan_misdn.c (original)
+++ team/group/cli_cleanup/channels/chan_misdn.c Sat Sep 27 18:32:15 2008
@@ -736,9 +736,9 @@
 
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "misdn set debug";
+		e->command = "misdn set debug {on|off|<level>}";
 		e->usage =
-			"Usage: misdn set debug <level> [only] | [port <port> [only]]\n"
+			"Usage: misdn set debug {on|off|<level>} [only] | [port <port> [only]]\n"
 			"       Set the debug level of the mISDN channel.\n";
 		return NULL;
 	case CLI_GENERATE:
@@ -747,8 +747,14 @@
 
 	if (a->argc < 4 || a->argc > 7)
 		return CLI_SHOWUSAGE;
-
-	level = atoi(a->argv[3]);
+	
+	if (!strcasecmp(a->argv[3], "on")) {
+		level = 1;
+	} else if (!strcasecmp(a->argv[3], "off")) {
+		level = 0;
+	} else {
+		level = atoi(a->argv[3]);
+	}
 
 	switch (a->argc) {
 	case 4:	




More information about the asterisk-commits mailing list