aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-21 21:59:12 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-21 21:59:12 +0000
commit2a2a1439668c0ddf528efe04673d2ba15ae78ce0 (patch)
treef166bba69d92b06b74ab2323297f68cfcd7789fb /res
parent901e02171baea1df9d10e7562f9fe32f64354f1f (diff)
Lots more removal of deprecated things
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43452 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c30
-rw-r--r--res/res_convert.c74
-rw-r--r--res/res_crypto.c14
-rw-r--r--res/res_features.c7
-rw-r--r--res/res_indications.c7
-rw-r--r--res/res_musiconhold.c75
-rw-r--r--res/res_odbc.c7
7 files changed, 12 insertions, 202 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 736cea394..e38cef2c2 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1314,15 +1314,6 @@ static int agi_do_debug(int fd, int argc, char *argv[])
return RESULT_SUCCESS;
}
-static int agi_no_debug_deprecated(int fd, int argc, char *argv[])
-{
- if (argc != 3)
- return RESULT_SHOWUSAGE;
- agidebug = 0;
- ast_cli(fd, "AGI Debugging Disabled\n");
- return RESULT_SUCCESS;
-}
-
static int agi_no_debug(int fd, int argc, char *argv[])
{
if (argc != 2)
@@ -2093,21 +2084,6 @@ static char dumpagihtml_help[] =
"Usage: agi dumphtml <filename>\n"
" Dumps the agi command list in html format to given filename\n";
-static struct ast_cli_entry cli_show_agi_deprecated = {
- { "show", "agi", NULL },
- handle_showagi, NULL,
- NULL };
-
-static struct ast_cli_entry cli_dump_agihtml_deprecated = {
- { "dump", "agihtml", NULL },
- handle_agidumphtml, NULL,
- NULL };
-
-static struct ast_cli_entry cli_agi_no_debug_deprecated = {
- { "agi", "no", "debug", NULL },
- agi_no_debug_deprecated, NULL,
- NULL };
-
static struct ast_cli_entry cli_agi[] = {
{ { "agi", "debug", NULL },
agi_do_debug, "Enable AGI debugging",
@@ -2115,15 +2091,15 @@ static struct ast_cli_entry cli_agi[] = {
{ { "agi", "nodebug", NULL },
agi_no_debug, "Disable AGI debugging",
- no_debug_usage, NULL, &cli_agi_no_debug_deprecated },
+ no_debug_usage },
{ { "agi", "list", NULL },
handle_showagi, "List AGI commands or specific help",
- showagi_help, NULL, &cli_show_agi_deprecated },
+ showagi_help },
{ { "agi", "dumphtml", NULL },
handle_agidumphtml, "Dumps a list of agi commands in html format",
- dumpagihtml_help, NULL, &cli_dump_agihtml_deprecated },
+ dumpagihtml_help },
};
static int unload_module(void)
diff --git a/res/res_convert.c b/res/res_convert.c
index 38d3e5399..d856c8faf 100644
--- a/res/res_convert.c
+++ b/res/res_convert.c
@@ -54,73 +54,6 @@ static int split_ext(char *filename, char **name, char **ext)
}
/*! \brief Convert a file from one format to another */
-static int cli_audio_convert_deprecated(int fd, int argc, char *argv[])
-{
- int ret = RESULT_FAILURE;
- struct ast_filestream *fs_in = NULL, *fs_out = NULL;
- struct ast_frame *f;
- struct timeval start;
- int cost;
- char *file_in = NULL, *file_out = NULL;
- char *name_in, *ext_in, *name_out, *ext_out;
-
- /* ugly, can be removed when CLI entries have ast_module pointers */
- ast_module_ref(ast_module_info->self);
-
- if (argc != 3 || ast_strlen_zero(argv[1]) || ast_strlen_zero(argv[2])) {
- ret = RESULT_SHOWUSAGE;
- goto fail_out;
- }
-
- file_in = ast_strdupa(argv[1]);
- file_out = ast_strdupa(argv[2]);
-
- if (split_ext(file_in, &name_in, &ext_in)) {
- ast_cli(fd, "'%s' is an invalid filename!\n", argv[1]);
- goto fail_out;
- }
- if (!(fs_in = ast_readfile(name_in, ext_in, NULL, O_RDONLY, 0, 0))) {
- ast_cli(fd, "Unable to open input file: %s\n", argv[1]);
- goto fail_out;
- }
-
- if (split_ext(file_out, &name_out, &ext_out)) {
- ast_cli(fd, "'%s' is an invalid filename!\n", argv[2]);
- goto fail_out;
- }
- if (!(fs_out = ast_writefile(name_out, ext_out, NULL, O_CREAT|O_TRUNC|O_WRONLY, 0, 0644))) {
- ast_cli(fd, "Unable to open output file: %s\n", argv[2]);
- goto fail_out;
- }
-
- start = ast_tvnow();
-
- while ((f = ast_readframe(fs_in))) {
- if (ast_writestream(fs_out, f)) {
- ast_cli(fd, "Failed to convert %s.%s to %s.%s!\n", name_in, ext_in, name_out, ext_out);
- goto fail_out;
- }
- }
-
- cost = ast_tvdiff_ms(ast_tvnow(), start);
- ast_cli(fd, "Converted %s.%s to %s.%s in %dms\n", name_in, ext_in, name_out, ext_out, cost);
- ret = RESULT_SUCCESS;
-
-fail_out:
- if (fs_out) {
- ast_closestream(fs_out);
- if (ret != RESULT_SUCCESS)
- ast_filedelete(name_out, ext_out);
- }
-
- if (fs_in)
- ast_closestream(fs_in);
-
- ast_module_unref(ast_module_info->self);
-
- return ret;
-}
-
static int cli_audio_convert(int fd, int argc, char *argv[])
{
int ret = RESULT_FAILURE;
@@ -195,15 +128,10 @@ static char usage_audio_convert[] =
"Example:\n"
" file convert tt-weasels.gsm tt-weasels.ulaw\n";
-static struct ast_cli_entry cli_convert_deprecated = {
- { "convert" , NULL },
- cli_audio_convert_deprecated, NULL,
- NULL };
-
static struct ast_cli_entry cli_convert[] = {
{ { "file", "convert" , NULL },
cli_audio_convert, "Convert audio file",
- usage_audio_convert, NULL, &cli_convert_deprecated },
+ usage_audio_convert },
};
static int unload_module(void)
diff --git a/res/res_crypto.c b/res/res_crypto.c
index 586dd77cf..c12c11a51 100644
--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -561,24 +561,14 @@ static char init_keys_usage[] =
"Usage: keys init\n"
" Initializes private keys (by reading in pass code from the user)\n";
-static struct ast_cli_entry cli_show_keys_deprecated = {
- { "show", "keys", NULL },
- show_keys, NULL,
- NULL };
-
-static struct ast_cli_entry cli_init_keys_deprecated = {
- { "init", "keys", NULL },
- init_keys, NULL,
- NULL };
-
static struct ast_cli_entry cli_crypto[] = {
{ { "keys", "list", NULL },
show_keys, "Displays RSA key information",
- show_key_usage, NULL, &cli_show_keys_deprecated },
+ show_key_usage },
{ { "keys", "init", NULL },
init_keys, "Initialize RSA key passcodes",
- init_keys_usage, NULL, &cli_init_keys_deprecated },
+ init_keys_usage },
};
static int crypto_init(void)
diff --git a/res/res_features.c b/res/res_features.c
index 48e493e09..2dcf161b0 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1919,15 +1919,10 @@ static char showparked_help[] =
"Usage: show parkedcalls\n"
" Lists currently parked calls.\n";
-static struct ast_cli_entry cli_show_features_deprecated = {
- { "show", "features", NULL },
- handle_showfeatures, NULL,
- NULL };
-
static struct ast_cli_entry cli_features[] = {
{ { "feature", "list", NULL },
handle_showfeatures, "Lists configured features",
- showfeatures_help, NULL, &cli_show_features_deprecated },
+ showfeatures_help },
{ { "show", "parkedcalls", NULL },
handle_parkedcalls, "Lists parked calls",
diff --git a/res/res_indications.c b/res/res_indications.c
index 34ddf1e31..25a0d4d7c 100644
--- a/res/res_indications.c
+++ b/res/res_indications.c
@@ -345,11 +345,6 @@ out: v = v->next;
/*
* CLI entries for commands provided by this module
*/
-static struct ast_cli_entry cli_show_indications_deprecated = {
- { "show", "indications", NULL },
- handle_show_indications, NULL,
- NULL };
-
static struct ast_cli_entry cli_indications[] = {
{ { "indication", "add", NULL },
handle_add_indication, "Add the given indication to the country",
@@ -361,7 +356,7 @@ static struct ast_cli_entry cli_indications[] = {
{ { "indication", "list", NULL },
handle_show_indications, "Display a list of all countries/indications",
- help_show_indications, NULL, &cli_show_indications_deprecated },
+ help_show_indications },
};
/*
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 130533069..3f2e65ab6 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -961,11 +961,8 @@ static int load_moh_classes(int reload)
struct ast_config *cfg;
struct ast_variable *var;
struct mohclass *class;
- char *data;
- char *args;
char *cat;
int numclasses = 0;
- static int dep_warning = 0;
cfg = ast_config_load("musiconhold.conf");
@@ -974,6 +971,7 @@ static int load_moh_classes(int reload)
cat = ast_category_browse(cfg, NULL);
for (; cat; cat = ast_category_browse(cfg, cat)) {
+ /* These names were deprecated in 1.4 and should not be used until after the next major release. */
if (strcasecmp(cat, "classes") && strcasecmp(cat, "moh_files")) {
if (!(class = moh_class_malloc())) {
break;
@@ -1026,63 +1024,6 @@ static int load_moh_classes(int reload)
}
}
-
- /* Deprecated Old-School Configuration */
- var = ast_variable_browse(cfg, "classes");
- while (var) {
- if (!dep_warning) {
- ast_log(LOG_WARNING, "The old musiconhold.conf syntax has been deprecated! Please refer to the sample configuration for information on the new syntax.\n");
- dep_warning = 1;
- }
- data = strchr(var->value, ':');
- if (data) {
- *data++ = '\0';
- args = strchr(data, ',');
- if (args)
- *args++ = '\0';
- if (!(get_mohbyname(var->name))) {
- if (!(class = moh_class_malloc())) {
- return numclasses;
- }
-
- ast_copy_string(class->name, var->name, sizeof(class->name));
- ast_copy_string(class->dir, data, sizeof(class->dir));
- ast_copy_string(class->mode, var->value, sizeof(class->mode));
- if (args)
- ast_copy_string(class->args, args, sizeof(class->args));
-
- moh_register(class, reload);
- numclasses++;
- }
- }
- var = var->next;
- }
- var = ast_variable_browse(cfg, "moh_files");
- while (var) {
- if (!dep_warning) {
- ast_log(LOG_WARNING, "The old musiconhold.conf syntax has been deprecated! Please refer to the sample configuration for information on the new syntax.\n");
- dep_warning = 1;
- }
- if (!(get_mohbyname(var->name))) {
- args = strchr(var->value, ',');
- if (args)
- *args++ = '\0';
- if (!(class = moh_class_malloc())) {
- return numclasses;
- }
-
- ast_copy_string(class->name, var->name, sizeof(class->name));
- ast_copy_string(class->dir, var->value, sizeof(class->dir));
- strcpy(class->mode, "files");
- if (args)
- ast_copy_string(class->args, args, sizeof(class->args));
-
- moh_register(class, reload);
- numclasses++;
- }
- var = var->next;
- }
-
ast_config_destroy(cfg);
return numclasses;
@@ -1187,16 +1128,6 @@ static int moh_classes_show(int fd, int argc, char *argv[])
return 0;
}
-static struct ast_cli_entry cli_moh_classes_show_deprecated = {
- { "moh", "classes", "show"},
- moh_classes_show, NULL,
- NULL };
-
-static struct ast_cli_entry cli_moh_files_show_deprecated = {
- { "moh", "files", "show"},
- cli_files_show, NULL,
- NULL };
-
static struct ast_cli_entry cli_moh[] = {
{ { "moh", "reload"},
moh_cli, "Music On Hold",
@@ -1204,11 +1135,11 @@ static struct ast_cli_entry cli_moh[] = {
{ { "moh", "list", "classes"},
moh_classes_show, "List MOH classes",
- "Lists all MOH classes", NULL, &cli_moh_classes_show_deprecated },
+ "Lists all MOH classes" },
{ { "moh", "list", "files"},
cli_files_show, "List MOH file-based classes",
- "Lists all loaded file-based MOH classes and their files", NULL, &cli_moh_files_show_deprecated },
+ "Lists all loaded file-based MOH classes and their files" },
};
static int init_classes(int reload)
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 7b7b2cc12..33836aa8d 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -341,15 +341,10 @@ static char show_usage[] =
" List settings of a particular ODBC class.\n"
" or, if not specified, all classes.\n";
-static struct ast_cli_entry cli_odbc_show_deprecated = {
- { "odbc", "show", NULL },
- odbc_show_command, NULL,
- NULL };
-
static struct ast_cli_entry cli_odbc[] = {
{ { "odbc", "list", NULL },
odbc_show_command, "List ODBC DSN(s)",
- show_usage, NULL, &cli_odbc_show_deprecated },
+ show_usage },
};
static int odbc_register_class(struct odbc_class *class, int connect)