[asterisk-commits] file: trunk r56009 - in /trunk: ./ main/cli.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 21 17:38:47 MST 2007


Author: file
Date: Wed Feb 21 18:38:46 2007
New Revision: 56009

URL: http://svn.digium.com/view/asterisk?view=rev&rev=56009
Log:
Merged revisions 56008 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r56008 | file | 2007-02-21 19:35:55 -0500 (Wed, 21 Feb 2007) | 2 lines

Print out deprecation notice on usage output of CLI commands. (issue #8925 reported by blitzrage)

........

Modified:
    trunk/   (props changed)
    trunk/main/cli.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?view=diff&rev=56009&r1=56008&r2=56009
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Wed Feb 21 18:38:46 2007
@@ -1729,8 +1729,11 @@
 	switch (res) {
 	case RESULT_SHOWUSAGE:
 		ast_cli(fd, "%s", S_OR(e->usage, "Invalid usage, but no usage information available.\n"));
+		AST_LIST_LOCK(&helpers);
+		if (e->deprecated)
+			ast_cli(fd, "The '%s' command is deprecated and will be removed in a future release. Please use '%s' instead.\n", e->_full_cmd, e->_deprecated_by);
+		AST_LIST_UNLOCK(&helpers);
 		break;
-
 	case RESULT_FAILURE:
 		ast_cli(fd, "Command '%s' failed.\n", s);
 		/* FALLTHROUGH */



More information about the asterisk-commits mailing list