summaryrefslogtreecommitdiff
path: root/main/translate.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-11-20 15:00:41 +0000
committerJoshua Colp <jcolp@digium.com>2007-11-20 15:00:41 +0000
commit5e4e4c55943e459461e37bc0a4497c5de4371cc9 (patch)
tree0bf848984826fc57bc161e085334bab4676a5c12 /main/translate.c
parent50f899b0c34576208b2c37148fdd527d704bc1fb (diff)
Minor documentation tweak and if an incorrect parameter is given to core show translation return the usage information.
(closes issue #11316) Reported by: eliel Patches: translate.c.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/translate.c')
-rw-r--r--main/translate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/translate.c b/main/translate.c
index 1375e588b..aa656cf5c 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -494,7 +494,7 @@ static char *handle_cli_core_show_translation(struct ast_cli_entry *e, int cmd,
case CLI_INIT:
e->command = "core show translation [recalc]";
e->usage =
- "Usage: core show translation [recalc] [<recalc seconds>]\n"
+ "Usage: core show translation [recalc [<recalc seconds>]]\n"
" Displays known codec translators and the cost associated\n"
" with each conversion. If the argument 'recalc' is supplied along\n"
" with optional number of seconds to test a new test will be performed\n"
@@ -523,7 +523,8 @@ static char *handle_cli_core_show_translation(struct ast_cli_entry *e, int cmd,
AST_RWLIST_WRLOCK(&translators);
rebuild_matrix(z);
AST_RWLIST_UNLOCK(&translators);
- }
+ } else if (a->argc > 3)
+ return CLI_SHOWUSAGE;
AST_RWLIST_RDLOCK(&translators);