diff options
author | dhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-06 21:22:56 +0000 |
---|---|---|
committer | dhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-06 21:22:56 +0000 |
commit | 156764ae9824f8ece3851e6ffa50b5046c96696f (patch) | |
tree | 8bd7fd97dd2c552f58d223dbbc70ce039306b657 | |
parent | 7e11f61699a6ecd5d346a1871d9e88fa3c787ab7 (diff) |
move taskprocessor CLI commands into the core namespace
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136245 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/taskprocessor.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/main/taskprocessor.c b/main/taskprocessor.c index 80318ce2e..140943f75 100644 --- a/main/taskprocessor.c +++ b/main/taskprocessor.c @@ -160,7 +160,7 @@ static char *tps_taskprocessor_tab_complete(struct ast_taskprocessor *p, struct 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 @@ static char *cli_tps_ping(struct ast_cli_entry *e, int cmd, struct ast_cli_args 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 @@ static char *cli_tps_ping(struct ast_cli_entry *e, int cmd, struct ast_cli_args 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 @@ static char *cli_tps_report(struct ast_cli_entry *e, int cmd, struct ast_cli_arg 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: |