aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-12 06:46:04 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-12 06:46:04 +0000
commite005e919bd11efc270b218eb4d43117290bfe7ed (patch)
tree95cbe393b660ef9b967378388db5bd09c7a890f4 /pbx
parentd6ee75c629ce205626eb7cd813dc74f709939f42 (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: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_ael.c37
-rw-r--r--pbx/pbx_dundi.c56
2 files changed, 3 insertions, 90 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 81801f1c9..65569f5b9 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -153,40 +153,6 @@ static int pbx_load_module(void)
}
/* CLI interface */
-static char *handle_cli_ael_debug_multiple_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- switch (cmd) {
- case CLI_INIT:
- e->command = "ael debug [read|tokens|macros|contexts|off]";
- e->usage =
- "Usage: ael debug [read|tokens|macros|contexts|off]\n"
- " Enable AEL read, token, macro, or context debugging,\n"
- " or disable all AEL debugging messages. Note: this\n"
- " currently does nothing.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc != 3)
- return CLI_SHOWUSAGE;
-
- if (!strcasecmp(a->argv[2], "read"))
- aeldebug |= DEBUG_READ;
- else if (!strcasecmp(a->argv[2], "tokens"))
- aeldebug |= DEBUG_TOKENS;
- else if (!strcasecmp(a->argv[2], "macros"))
- aeldebug |= DEBUG_MACROS;
- else if (!strcasecmp(a->argv[2], "contexts"))
- aeldebug |= DEBUG_CONTEXTS;
- else if (!strcasecmp(a->argv[2], "off"))
- aeldebug = 0;
- else
- return CLI_SHOWUSAGE;
-
- return CLI_SUCCESS;
-}
-
static char *handle_cli_ael_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
switch (cmd) {
@@ -240,10 +206,9 @@ static char *handle_cli_ael_reload(struct ast_cli_entry *e, int cmd, struct ast_
return (pbx_load_module() ? CLI_FAILURE : CLI_SUCCESS);
}
-static struct ast_cli_entry cli_ael_debug_multiple_deprecated = AST_CLI_DEFINE(handle_cli_ael_debug_multiple_deprecated, "Enable AEL debugging flags");
static struct ast_cli_entry cli_ael[] = {
AST_CLI_DEFINE(handle_cli_ael_reload, "Reload AEL configuration"),
- AST_CLI_DEFINE(handle_cli_ael_set_debug, "Enable AEL debugging flags", .deprecate_cmd = &cli_ael_debug_multiple_deprecated)
+ AST_CLI_DEFINE(handle_cli_ael_set_debug, "Enable AEL debugging flags")
};
static int unload_module(void)
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 12ab1328d..2b2ff6ef8 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -2156,30 +2156,6 @@ static int start_network_thread(void)
return 0;
}
-static char *dundi_do_debug_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- switch (cmd) {
- case CLI_INIT:
- e->command = "dundi [no] debug";
- e->usage =
- "Usage: dundi [no] debug\n"
- " Enables/Disables dumping of DUNDi packets for debugging purposes\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
- if (a->argc < 2 || a->argc > 3)
- return CLI_SHOWUSAGE;
- if (a->argc == 2) {
- dundidebug = 1;
- ast_cli(a->fd, "DUNDi Debugging Enabled\n");
- } else {
- dundidebug = 0;
- ast_cli(a->fd, "DUNDi Debugging Disabled\n");
- }
- return CLI_SUCCESS;
-}
-
static char *dundi_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
switch (cmd) {
@@ -2206,32 +2182,6 @@ static char *dundi_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
return CLI_SUCCESS;
}
-static char *dundi_do_store_history_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- switch (cmd) {
- case CLI_INIT:
- e->command = "dundi [no] store history";
- e->usage =
- "Usage: dundi [no] store history\n"
- " Enables/Disables storing of DUNDi requests and times for debugging\n"
- "purposes\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
- if (a->argc < 3 || a->argc > 4)
- return CLI_SHOWUSAGE;
-
- if (a->argc == 3) {
- global_storehistory = 1;
- ast_cli(a->fd, "DUNDi History Storage Enabled\n");
- } else {
- global_storehistory = 0;
- ast_cli(a->fd, "DUNDi History Storage Disabled\n");
- }
- return CLI_SUCCESS;
-}
-
static char *dundi_store_history(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
switch (cmd) {
@@ -2819,11 +2769,9 @@ static char *dundi_show_precache(struct ast_cli_entry *e, int cmd, struct ast_cl
#undef FORMAT2
}
-static struct ast_cli_entry cli_dundi_do_debug_deprecated = AST_CLI_DEFINE(dundi_do_debug_deprecated, "Enable/Disable DUNDi debugging");
-static struct ast_cli_entry cli_dundi_do_store_history_deprecated = AST_CLI_DEFINE(dundi_do_store_history_deprecated, "Enable/Disable DUNDi historic records");
static struct ast_cli_entry cli_dundi[] = {
- AST_CLI_DEFINE(dundi_set_debug, "Enable/Disable DUNDi debugging", .deprecate_cmd = &cli_dundi_do_debug_deprecated),
- AST_CLI_DEFINE(dundi_store_history, "Enable/Disable DUNDi historic records", .deprecate_cmd = &cli_dundi_do_store_history_deprecated),
+ AST_CLI_DEFINE(dundi_set_debug, "Enable/Disable DUNDi debugging"),
+ AST_CLI_DEFINE(dundi_store_history, "Enable/Disable DUNDi historic records"),
AST_CLI_DEFINE(dundi_flush, "Flush DUNDi cache"),
AST_CLI_DEFINE(dundi_show_peers, "Show defined DUNDi peers"),
AST_CLI_DEFINE(dundi_show_trans, "Show active DUNDi transactions"),