diff options
author | Michiel van Baak <michiel@vanbaak.info> | 2008-09-28 23:32:14 +0000 |
---|---|---|
committer | Michiel van Baak <michiel@vanbaak.info> | 2008-09-28 23:32:14 +0000 |
commit | 90751b16caec323d90ddf7d41db4a25085a3bd76 (patch) | |
tree | d5167b9db2e6c55e56def0e52038799c477d3e3d /channels/chan_misdn.c | |
parent | 434c69b7fde58f0613afa8477d5a21e4dc76bf0d (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_misdn.c')
-rw-r--r-- | channels/chan_misdn.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 5cec653cb..3d3da0c42 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -736,9 +736,9 @@ static char *handle_cli_misdn_set_debug(struct ast_cli_entry *e, int cmd, struct switch (cmd) { case CLI_INIT: - e->command = "misdn set debug"; + e->command = "misdn set debug {on|off|<level>}"; e->usage = - "Usage: misdn set debug <level> [only] | [port <port> [only]]\n" + "Usage: misdn set debug {on|off|<level>} [only] | [port <port> [only]]\n" " Set the debug level of the mISDN channel.\n"; return NULL; case CLI_GENERATE: @@ -747,8 +747,14 @@ static char *handle_cli_misdn_set_debug(struct ast_cli_entry *e, int cmd, struct if (a->argc < 4 || a->argc > 7) return CLI_SHOWUSAGE; - - level = atoi(a->argv[3]); + + if (!strcasecmp(a->argv[3], "on")) { + level = 1; + } else if (!strcasecmp(a->argv[3], "off")) { + level = 0; + } else { + level = atoi(a->argv[3]); + } switch (a->argc) { case 4: |