]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Print out deprecation notice on usage output of CLI commands. (issue #8925 reported...
authorJoshua Colp <jcolp@digium.com>
Thu, 22 Feb 2007 00:35:55 +0000 (00:35 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 22 Feb 2007 00:35:55 +0000 (00:35 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@56008 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cli.c

index baa4d6a3889784d81a07b7d209bf8662b63a9053..9665fcbfa04ddf585e3184d21fd6316bf7ce9954 100644 (file)
@@ -1990,6 +1990,10 @@ int ast_cli_command(int fd, const char *s)
                                        ast_cli(fd, "%s", e->usage);
                                else
                                        ast_cli(fd, "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;
                        default:
                                AST_LIST_LOCK(&helpers);