mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 16:33:34 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user