[asterisk-commits] dhubbard: trunk r136245 - /trunk/main/taskprocessor.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 6 16:22:56 CDT 2008


Author: dhubbard
Date: Wed Aug  6 16:22:56 2008
New Revision: 136245

URL: http://svn.digium.com/view/asterisk?view=rev&rev=136245
Log:
move taskprocessor CLI commands into the core namespace

Modified:
    trunk/main/taskprocessor.c

Modified: trunk/main/taskprocessor.c
URL: http://svn.digium.com/view/asterisk/trunk/main/taskprocessor.c?view=diff&rev=136245&r1=136244&r2=136245
==============================================================================
--- trunk/main/taskprocessor.c (original)
+++ trunk/main/taskprocessor.c Wed Aug  6 16:22:56 2008
@@ -160,7 +160,7 @@
 	char *name = NULL;
 	struct ao2_iterator i;
 
-	if (a->pos != 2)
+	if (a->pos != 3)
 		return NULL;
 
 	tklen = strlen(a->word);
@@ -196,19 +196,19 @@
 
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "taskprocessor ping";
+		e->command = "core taskprocessor ping";
 		e->usage = 
-			"Usage: taskprocessor ping <taskprocessor>\n"
-			"	Displays the time required for a processor to deliver a task\n";
+			"Usage: core taskprocessor ping <taskprocessor>\n"
+			"	Displays the time required for a task to be processed\n";
 		return NULL;
 	case CLI_GENERATE:
 		return tps_taskprocessor_tab_complete(tps, a);
 	}
 
-	if (a->argc != 3)
+	if (a->argc != 4)
 		return CLI_SHOWUSAGE;
 
-	name = a->argv[2];
+	name = a->argv[3];
 	if (!(tps = ast_taskprocessor_get(name, TPS_REF_IF_EXISTS))) {
 		ast_cli(a->fd, "\nping failed: %s not found\n\n", name);
 		return CLI_SUCCESS;
@@ -232,7 +232,6 @@
 	return CLI_SUCCESS;	
 }
 
-/* TPS reports are cool */
 static char *cli_tps_report(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	char name[256];
@@ -245,9 +244,9 @@
 
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "taskprocessor show stats";
+		e->command = "core show taskprocessors";
 		e->usage = 
-			"Usage: taskprocessor show stats\n"
+			"Usage: core show taskprocessors\n"
 			"	Shows a list of instantiated task processors and their statistics\n";
 		return NULL;
 	case CLI_GENERATE:




More information about the asterisk-commits mailing list