From e005e919bd11efc270b218eb4d43117290bfe7ed Mon Sep 17 00:00:00 2001 From: mvanbaak Date: Wed, 12 Nov 2008 06:46:04 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b --- funcs/func_devstate.c | 47 +---------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) (limited to 'funcs/func_devstate.c') diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c index f164cb7c1..6c02ca037 100644 --- a/funcs/func_devstate.c +++ b/funcs/func_devstate.c @@ -188,50 +188,6 @@ static enum ast_device_state custom_devstate_callback(const char *data) return ast_devstate_val(buf); } -static char *handle_cli_funcdevstate_list(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - struct ast_db_entry *db_entry, *db_tree; - - switch (cmd) { - case CLI_INIT: - e->command = "funcdevstate list"; - e->usage = - "Usage: funcdevstate list\n" - " List all custom device states that have been set by using\n" - " the DEVICE_STATE dialplan function.\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - - if (a->argc != e->args) - return CLI_SHOWUSAGE; - - ast_cli(a->fd, "\n" - "---------------------------------------------------------------------\n" - "--- Custom Device States --------------------------------------------\n" - "---------------------------------------------------------------------\n" - "---\n"); - - db_entry = db_tree = ast_db_gettree(astdb_family, NULL); - for (; db_entry; db_entry = db_entry->next) { - const char *dev_name = strrchr(db_entry->key, '/') + 1; - if (dev_name <= (const char *) 1) - continue; - ast_cli(a->fd, "--- Name: 'Custom:%s' State: '%s'\n" - "---\n", dev_name, db_entry->data); - } - ast_db_freetree(db_tree); - db_tree = NULL; - - ast_cli(a->fd, - "---------------------------------------------------------------------\n" - "---------------------------------------------------------------------\n" - "\n"); - - return CLI_SUCCESS; -} - static char *handle_cli_devstate_list(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { struct ast_db_entry *db_entry, *db_tree; @@ -339,9 +295,8 @@ static char *handle_cli_devstate_change(struct ast_cli_entry *e, int cmd, struct return CLI_SUCCESS; } -static struct ast_cli_entry cli_funcdevstate_list_deprecated = AST_CLI_DEFINE(handle_cli_funcdevstate_list, "List currently known custom device states"); static struct ast_cli_entry cli_funcdevstate[] = { - AST_CLI_DEFINE(handle_cli_devstate_list, "List currently known custom device states", .deprecate_cmd = &cli_funcdevstate_list_deprecated), + AST_CLI_DEFINE(handle_cli_devstate_list, "List currently known custom device states"), AST_CLI_DEFINE(handle_cli_devstate_change, "Change a custom device state"), }; -- cgit v1.2.3