aboutsummaryrefslogtreecommitdiffstats
path: root/main/cli.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-22 00:38:46 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-22 00:38:46 +0000
commitecb2102037809d08837064ff1720f2de2979bbf1 (patch)
tree3b14df45dc64d65c46447ae3c3164c3a60cd00aa /main/cli.c
parent081e5ebfe3d8198bd0b5ae69cefdbf25206a4d38 (diff)
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) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56009 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c
index a44a33348..74bcfd87d 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -1729,8 +1729,11 @@ int ast_cli_command(int fd, const char *s)
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 */