diff options
author | Dwayne M. Hubbard <dwayne.hubbard@gmail.com> | 2008-08-06 21:22:56 +0000 |
---|---|---|
committer | Dwayne M. Hubbard <dwayne.hubbard@gmail.com> | 2008-08-06 21:22:56 +0000 |
commit | 367dfcb0ab6d7d47b39ed0a10ca84e51b73b6732 (patch) | |
tree | 8bd7fd97dd2c552f58d223dbbc70ce039306b657 | |
parent | 53f7d97a1a4494a0cb4995714b1c775b1f11c4dc (diff) |
move taskprocessor CLI commands into the core namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-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: |