[asterisk-commits] file: trunk r89449 - /trunk/main/translate.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 20 09:00:42 CST 2007


Author: file
Date: Tue Nov 20 09:00:41 2007
New Revision: 89449

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89449
Log:
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)

Modified:
    trunk/main/translate.c

Modified: trunk/main/translate.c
URL: http://svn.digium.com/view/asterisk/trunk/main/translate.c?view=diff&rev=89449&r1=89448&r2=89449
==============================================================================
--- trunk/main/translate.c (original)
+++ trunk/main/translate.c Tue Nov 20 09:00:41 2007
@@ -494,7 +494,7 @@
 	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 @@
 		AST_RWLIST_WRLOCK(&translators);
 		rebuild_matrix(z);
 		AST_RWLIST_UNLOCK(&translators);
-	}
+	} else if (a->argc > 3)
+		return CLI_SHOWUSAGE;
 
 	AST_RWLIST_RDLOCK(&translators);
 




More information about the asterisk-commits mailing list