[svn-commits] mvanbaak: branch group/res_clialiases r147591 - /team/group/res_clialiases/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 8 13:43:30 CDT 2008


Author: mvanbaak
Date: Wed Oct  8 13:43:30 2008
New Revision: 147591

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147591
Log:
'help' -> 'core show help'
Users wont notice, because there's a default 'friendly' alias for this

Modified:
    team/group/res_clialiases/main/cli.c

Modified: team/group/res_clialiases/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/group/res_clialiases/main/cli.c?view=diff&rev=147591&r1=147590&r2=147591
==============================================================================
--- team/group/res_clialiases/main/cli.c (original)
+++ team/group/res_clialiases/main/cli.c Wed Oct  8 13:43:30 2008
@@ -1545,37 +1545,37 @@
 	char *res = CLI_SUCCESS;
 
 	if (cmd == CLI_INIT) {
-		e->command = "help";
+		e->command = "core show help";
 		e->usage =
-			"Usage: help [topic]\n"
+			"Usage: core show help [topic]\n"
 			"       When called with a topic as an argument, displays usage\n"
 			"       information on the given command. If called without a\n"
 			"       topic, it provides a list of commands.\n";
 		return NULL;
 
 	} else if (cmd == CLI_GENERATE) {
-		/* skip first 4 or 5 chars, "help " */
+		/* skip first 14 or 15 chars, "help " */
 		int l = strlen(a->line);
 
-		if (l > 5)
-			l = 5;
+		if (l > 15)
+			l = 15;
 		/* XXX watch out, should stop to the non-generator parts */
 		return __ast_cli_generator(a->line + l, a->word, a->n, 0);
 	}
-	if (a->argc == 1)
+	if (a->argc == 3)
 		return help1(a->fd, NULL, 0);
 
 	AST_RWLIST_RDLOCK(&helpers);
-	my_e = find_cli(a->argv + 1, 1);	/* try exact match first */
+	my_e = find_cli(a->argv + 3, 1);	/* try exact match first */
 	if (!my_e) {
-		res = help1(a->fd, a->argv + 1, 1 /* locked */);
+		res = help1(a->fd, a->argv + 3, 1 /* locked */);
 		AST_RWLIST_UNLOCK(&helpers);
 		return res;
 	}
 	if (my_e->usage)
 		ast_cli(a->fd, "%s", my_e->usage);
 	else {
-		ast_join(fullcmd, sizeof(fullcmd), a->argv+1);
+		ast_join(fullcmd, sizeof(fullcmd), a->argv+3);
 		ast_cli(a->fd, "No help text available for '%s'.\n", fullcmd);
 	}
 	AST_RWLIST_UNLOCK(&helpers);




More information about the svn-commits mailing list