diff options
author | Michiel van Baak <michiel@vanbaak.info> | 2008-11-12 06:46:04 +0000 |
---|---|---|
committer | Michiel van Baak <michiel@vanbaak.info> | 2008-11-12 06:46:04 +0000 |
commit | 86f900b20105bf5e918d8347cab8557f33d5fdae (patch) | |
tree | 95cbe393b660ef9b967378388db5bd09c7a890f4 /res/res_agi.c | |
parent | 5b25c263181989a1f86be2c2c94c4425ec30721a (diff) |
This commit does two things:
- Add CLI aliases module to asterisk.
- Remove all deprecated CLI commands from the code
Initial work done by file.
Junk-Y and lmadsen did a lot of work and testing to
get the list of deprecated commands into the configuration file.
Deprecated CLI commands are now handled by this new module,
see cli_aliases.conf for more info about that.
ok russellb@ via reviewboard
(closes issue #13735)
Reported by: mvanbaak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_agi.c')
-rw-r--r-- | res/res_agi.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index a37364923..4220e423d 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -3013,30 +3013,6 @@ static int write_htmldump(char *filename) return 0; } -static char *handle_cli_agi_dumphtml_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - switch (cmd) { - case CLI_INIT: - e->command = "agi dumphtml"; - e->usage = - "Usage: agi dumphtml <filename>\n" - " Dumps the AGI command list in HTML format to the given\n" - " file.\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - if (a->argc < e->args + 1) - return CLI_SHOWUSAGE; - - if (write_htmldump(a->argv[2]) < 0) { - ast_cli(a->fd, "Could not create file '%s'\n", a->argv[2]); - return CLI_SHOWUSAGE; - } - ast_cli(a->fd, "AGI HTML commands dumped to: %s\n", a->argv[2]); - return CLI_SUCCESS; -} - static char *handle_cli_agi_dump_html(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { switch (cmd) { @@ -3164,13 +3140,11 @@ static int deadagi_exec(struct ast_channel *chan, void *data) return agi_exec(chan, data); } -static struct ast_cli_entry cli_agi_dumphtml_deprecated = AST_CLI_DEFINE(handle_cli_agi_dumphtml_deprecated, "Dumps a list of AGI commands in HTML format"); - static struct ast_cli_entry cli_agi[] = { AST_CLI_DEFINE(handle_cli_agi_add_cmd, "Add AGI command to a channel in Async AGI"), AST_CLI_DEFINE(handle_cli_agi_debug, "Enable/Disable AGI debugging"), AST_CLI_DEFINE(handle_cli_agi_show, "List AGI commands or specific help"), - AST_CLI_DEFINE(handle_cli_agi_dump_html, "Dumps a list of AGI commands in HTML format", .deprecate_cmd = &cli_agi_dumphtml_deprecated) + AST_CLI_DEFINE(handle_cli_agi_dump_html, "Dumps a list of AGI commands in HTML format") }; static int unload_module(void) |