diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-22 00:35:55 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-22 00:35:55 +0000 |
commit | 8e891d437a0ccb35b4175830f3ac9656b6dcadc5 (patch) | |
tree | 7ed760c4a3ba9111e8214ad50c6db5e19c0f1ac5 /main | |
parent | d99580e1015a3e079dfaec08b66e6ba6234181fe (diff) |
Print out deprecation notice on usage output of CLI commands. (issue #8925 reported by blitzrage)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56008 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/cli.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/cli.c b/main/cli.c index baa4d6a38..9665fcbfa 100644 --- a/main/cli.c +++ b/main/cli.c @@ -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); |