summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-02-08 21:26:32 +0000
committerRussell Bryant <russell@russellbryant.com>2008-02-08 21:26:32 +0000
commit1ec8cb41a8170201f45ff0efe65e96aa97e0b8d3 (patch)
tree425b3dafd75451669e2311d091127fe03d3c9693 /apps
parent52595c5d30f311b4e8d1c089577b8679adde232e (diff)
Merge changes from team/mvanbaak/cli-command-audit
(closes issue #8925) About a year ago, as Leif Madsen and Jim van Meggelen were going over the CLI commands in Asterisk 1.4 for the next version of their book, they documented a lot of inconsistencies. This set of changes addresses all of these issues and has been reviewed by Leif. While this does introduce even more changes to the CLI command structure, it makes everything consistent, which is the most important thing. Thanks to all that helped with this one! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_minivm.c2
-rw-r--r--apps/app_playback.c2
-rw-r--r--apps/app_rpt.c2
-rw-r--r--apps/app_voicemail.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 148ebf494..ae76f9e89 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -2602,7 +2602,7 @@ static char *handle_minivm_show_zones(struct ast_cli_entry *e, int cmd, struct a
return NULL;
}
- if (a->argc != 3)
+ if (a->argc != e->args)
return CLI_SHOWUSAGE;
AST_LIST_LOCK(&minivm_zones);
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 21b3ab3eb..b7409957a 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -374,7 +374,7 @@ static char *__say_cli_init(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
if (a->argc == 2) {
ast_cli(a->fd, "say mode is [%s]\n", old_mode);
return CLI_SUCCESS;
- } else if (a->argc != 3)
+ } else if (a->argc != e->args)
return CLI_SHOWUSAGE;
mode = a->argv[2];
if (!strcmp(mode, old_mode))
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 6eb0bfca8..f703aaec0 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -1090,7 +1090,7 @@ static char *handle_cli_rpt_debug_level(struct ast_cli_entry *e, int cmd, struct
case CLI_GENERATE:
return NULL;
}
- if (a->argc != 4)
+ if (a->argc != e->args)
return CLI_SHOWUSAGE;
newlevel = myatoi(a->argv[3]);
if ((newlevel < 0) || (newlevel > 7))
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 8d169061b..7a679a04e 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -7859,7 +7859,7 @@ static char *handle_voicemail_show_zones(struct ast_cli_entry *e, int cmd, struc
return NULL;
}
- if (a->argc != 3)
+ if (a->argc != e->args)
return CLI_SHOWUSAGE;
AST_LIST_LOCK(&zones);
@@ -7891,7 +7891,7 @@ static char *handle_voicemail_reload(struct ast_cli_entry *e, int cmd, struct as
return NULL;
}
- if (a->argc != 2)
+ if (a->argc != e->args)
return CLI_SHOWUSAGE;
ast_cli(a->fd, "Reloading voicemail configuration...\n");