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_jabber.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_jabber.c')
-rw-r--r-- | res/res_jabber.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c index ebb1059f5..4ee7ea9a4 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -96,7 +96,6 @@ static void *aji_recv_loop(void *data); static int aji_initialize(struct aji_client *client); static int aji_client_connect(void *data, ikspak *pak); static void aji_set_presence(struct aji_client *client, char *to, char *from, int level, char *desc); -static char *aji_do_debug_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); static char *aji_do_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); static char *aji_do_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); static char *aji_show_clients(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); @@ -123,9 +122,8 @@ static int aji_register_transport(void *data, ikspak *pak); static int aji_register_transport2(void *data, ikspak *pak); */ -static struct ast_cli_entry cli_aji_do_debug_deprecated = AST_CLI_DEFINE(aji_do_debug_deprecated, "Enable/disable jabber debugging"); static struct ast_cli_entry aji_cli[] = { - AST_CLI_DEFINE(aji_do_set_debug, "Enable/Disable Jabber debug", .deprecate_cmd = &cli_aji_do_debug_deprecated), + AST_CLI_DEFINE(aji_do_set_debug, "Enable/Disable Jabber debug"), AST_CLI_DEFINE(aji_do_reload, "Reload Jabber configuration"), AST_CLI_DEFINE(aji_show_clients, "Show state of clients and components"), AST_CLI_DEFINE(aji_show_buddies, "Show buddy lists of our clients"), @@ -2390,46 +2388,6 @@ static char *aji_do_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_a } /*! - * \brief Turn on/off console debugging (deprecated, use aji_do_set_debug). - * \return CLI_SUCCESS. - */ -static char *aji_do_debug_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) -{ - - switch (cmd) { - case CLI_INIT: - e->command = "jabber debug [off]"; - e->usage = - "Usage: jabber debug [off]\n" - " Enables/disables dumping of Jabber packets for debugging purposes.\n"; - return NULL; - case CLI_GENERATE: - return NULL; - } - - if (a->argc == 2) { - ASTOBJ_CONTAINER_TRAVERSE(&clients, 1, { - ASTOBJ_RDLOCK(iterator); - iterator->debug = 1; - ASTOBJ_UNLOCK(iterator); - }); - ast_cli(a->fd, "Jabber Debugging Enabled.\n"); - return CLI_SUCCESS; - } else if (a->argc == 3) { - if (!strncasecmp(a->argv[2], "off", 3)) { - ASTOBJ_CONTAINER_TRAVERSE(&clients, 1, { - ASTOBJ_RDLOCK(iterator); - iterator->debug = 0; - ASTOBJ_UNLOCK(iterator); - }); - ast_cli(a->fd, "Jabber Debugging Disabled.\n"); - return CLI_SUCCESS; - } - } - return CLI_SHOWUSAGE; /* defaults to invalid */ -} - -/*! * \brief Reload jabber module. * \return CLI_SUCCESS. */ |