diff options
author | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-09-28 23:32:14 +0000 |
---|---|---|
committer | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-09-28 23:32:14 +0000 |
commit | b6fa2c3b98f454c4b179f7e365c519b45d15bbd4 (patch) | |
tree | d5167b9db2e6c55e56def0e52038799c477d3e3d /main | |
parent | 74e9c236bd6246f61bed0397adcf87adad399e2e (diff) |
Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.
This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/astobj2.c | 6 | ||||
-rw-r--r-- | main/cli.c | 8 | ||||
-rw-r--r-- | main/manager.c | 12 | ||||
-rw-r--r-- | main/taskprocessor.c | 4 |
4 files changed, 15 insertions, 15 deletions
diff --git a/main/astobj2.c b/main/astobj2.c index c66501068..b80c407d0 100644 --- a/main/astobj2.c +++ b/main/astobj2.c @@ -862,9 +862,9 @@ static char *handle_astobj2_stats(struct ast_cli_entry *e, int cmd, struct ast_c { switch (cmd) { case CLI_INIT: - e->command = "astobj2 stats"; - e->usage = "Usage: astobj2 stats\n" - " Show astobj2 stats\n"; + e->command = "astobj2 show stats"; + e->usage = "Usage: astobj2 show stats\n" + " Show astobj2 show stats\n"; return NULL; case CLI_GENERATE: return NULL; diff --git a/main/cli.c b/main/cli.c index f07d8b015..be62352b0 100644 --- a/main/cli.c +++ b/main/cli.c @@ -756,18 +756,18 @@ static char *handle_softhangup(struct ast_cli_entry *e, int cmd, struct ast_cli_ switch (cmd) { case CLI_INIT: - e->command = "soft hangup"; + e->command = "channel request hangup"; e->usage = - "Usage: soft hangup <channel>\n" + "Usage: channel request hangup <channel>\n" " Request that a channel be hung up. The hangup takes effect\n" " the next time the driver reads or writes from the channel\n"; return NULL; case CLI_GENERATE: return ast_complete_channels(a->line, a->word, a->pos, a->n, 2); } - if (a->argc != 3) + if (a->argc != 4) return CLI_SHOWUSAGE; - c = ast_get_channel_by_name_locked(a->argv[2]); + c = ast_get_channel_by_name_locked(a->argv[3]); if (c) { ast_cli(a->fd, "Requested Hangup on channel '%s'\n", c->name); ast_softhangup(c, AST_SOFTHANGUP_EXPLICIT); diff --git a/main/manager.c b/main/manager.c index 7d57eb673..ee93dad36 100644 --- a/main/manager.c +++ b/main/manager.c @@ -519,18 +519,18 @@ static char *handle_mandebug(struct ast_cli_entry *e, int cmd, struct ast_cli_ar { switch (cmd) { case CLI_INIT: - e->command = "manager debug [on|off]"; - e->usage = "Usage: manager debug [on|off]\n Show, enable, disable debugging of the manager code.\n"; + e->command = "manager set debug [on|off]"; + e->usage = "Usage: manager set debug [on|off]\n Show, enable, disable debugging of the manager code.\n"; return NULL; case CLI_GENERATE: return NULL; } - if (a->argc == 2) + if (a->argc == 3) ast_cli(a->fd, "manager debug is %s\n", manager_debug? "on" : "off"); - else if (a->argc == 3) { - if (!strcasecmp(a->argv[2], "on")) + else if (a->argc == 4) { + if (!strcasecmp(a->argv[3], "on")) manager_debug = 1; - else if (!strcasecmp(a->argv[2], "off")) + else if (!strcasecmp(a->argv[3], "off")) manager_debug = 0; else return CLI_SHOWUSAGE; diff --git a/main/taskprocessor.c b/main/taskprocessor.c index 450d579c1..6ed939b45 100644 --- a/main/taskprocessor.c +++ b/main/taskprocessor.c @@ -196,9 +196,9 @@ static char *cli_tps_ping(struct ast_cli_entry *e, int cmd, struct ast_cli_args switch (cmd) { case CLI_INIT: - e->command = "core taskprocessor ping"; + e->command = "core ping taskprocessor"; e->usage = - "Usage: core taskprocessor ping <taskprocessor>\n" + "Usage: core ping taskprocessor <taskprocessor>\n" " Displays the time required for a task to be processed\n"; return NULL; case CLI_GENERATE: |