aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-28 23:32:14 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-28 23:32:14 +0000
commitb6fa2c3b98f454c4b179f7e365c519b45d15bbd4 (patch)
treed5167b9db2e6c55e56def0e52038799c477d3e3d /channels/chan_h323.c
parent74e9c236bd6246f61bed0397adcf87adad399e2e (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 'channels/chan_h323.c')
-rw-r--r--channels/chan_h323.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 36f8cd5eb..b374aff0f 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -2619,16 +2619,16 @@ static char *handle_cli_h323_set_trace(struct ast_cli_entry *e, int cmd, struct
{
switch (cmd) {
case CLI_INIT:
- e->command = "h323 set trace [off]";
+ e->command = "h323 set trace [on|off]";
e->usage =
- "Usage: h323 set trace (off|<trace level>)\n"
+ "Usage: h323 set trace (on|off|<trace level>)\n"
" Enable/Disable H.323 stack tracing for debugging purposes\n";
return NULL;
case CLI_GENERATE:
return NULL;
}
- if (a->argc != 4)
+ if (a->argc != e->args)
return CLI_SHOWUSAGE;
if (!strcasecmp(a->argv[3], "off")) {
h323_debug(0, 0);
@@ -2645,21 +2645,21 @@ static char *handle_cli_h323_set_debug(struct ast_cli_entry *e, int cmd, struct
{
switch (cmd) {
case CLI_INIT:
- e->command = "h323 set debug [off]";
+ e->command = "h323 set debug [on|off]";
e->usage =
- "Usage: h323 set debug [off]\n"
+ "Usage: h323 set debug [on|off]\n"
" Enable/Disable H.323 debugging output\n";
return NULL;
case CLI_GENERATE:
return NULL;
}
- if (a->argc < 3 || a->argc > 4)
+ if (a->argc != e->args)
return CLI_SHOWUSAGE;
- if (a->argc == 4 && strcasecmp(a->argv[3], "off"))
+ if (strcasecmp(a->argv[3], "on") && strcasecmp(a->argv[3], "off"))
return CLI_SHOWUSAGE;
- h323debug = (a->argc == 3) ? 1 : 0;
+ h323debug = (strcasecmp(a->argv[3], "on")) ? 0 : 1;
ast_cli(a->fd, "H.323 Debugging %s\n", h323debug ? "Enabled" : "Disabled");
return CLI_SUCCESS;
}