summaryrefslogtreecommitdiff
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authorMichiel van Baak <michiel@vanbaak.info>2008-09-28 23:32:14 +0000
committerMichiel van Baak <michiel@vanbaak.info>2008-09-28 23:32:14 +0000
commit90751b16caec323d90ddf7d41db4a25085a3bd76 (patch)
treed5167b9db2e6c55e56def0e52038799c477d3e3d /channels/chan_h323.c
parent434c69b7fde58f0613afa8477d5a21e4dc76bf0d (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: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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;
}