[asterisk-commits] tilghman: trunk r43449 - in /trunk: apps/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Sep 21 14:17:40 MST 2006


Author: tilghman
Date: Thu Sep 21 16:17:39 2006
New Revision: 43449

URL: http://svn.digium.com/view/asterisk?rev=43449&view=rev
Log:
Remove deprecated CLI apps from the core

Removed:
    trunk/apps/app_setcdruserfield.c
Modified:
    trunk/apps/app_queue.c
    trunk/main/asterisk.c
    trunk/main/astmm.c
    trunk/main/channel.c
    trunk/main/cli.c
    trunk/main/config.c
    trunk/main/file.c
    trunk/main/frame.c
    trunk/main/http.c
    trunk/main/image.c
    trunk/main/logger.c
    trunk/main/manager.c
    trunk/main/pbx.c
    trunk/main/rtp.c
    trunk/main/translate.c
    trunk/main/udptl.c

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Sep 21 16:17:39 2006
@@ -95,7 +95,6 @@
 
 enum {
 	QUEUE_STRATEGY_RINGALL = 0,
-	QUEUE_STRATEGY_ROUNDROBIN,
 	QUEUE_STRATEGY_LEASTRECENT,
 	QUEUE_STRATEGY_FEWESTCALLS,
 	QUEUE_STRATEGY_RANDOM,
@@ -107,7 +106,6 @@
 	char *name;
 } strategies[] = {
 	{ QUEUE_STRATEGY_RINGALL, "ringall" },
-	{ QUEUE_STRATEGY_ROUNDROBIN, "roundrobin" },
 	{ QUEUE_STRATEGY_LEASTRECENT, "leastrecent" },
 	{ QUEUE_STRATEGY_FEWESTCALLS, "fewestcalls" },
 	{ QUEUE_STRATEGY_RANDOM, "random" },
@@ -402,16 +400,6 @@
 static AST_LIST_HEAD_STATIC(queues, call_queue);
 
 static int set_member_paused(char *queuename, char *interface, int paused);
-
-static void rr_dep_warning(void)
-{
-	static unsigned int warned = 0;
-
-	if (!warned) {
-		ast_log(LOG_NOTICE, "The 'roundrobin' queue strategy is deprecated. Please use the 'rrmemory' strategy instead.\n");
-		warned = 1;
-	}
-}
 
 static void set_queue_result(struct ast_channel *chan, enum queue_result res)
 {
@@ -1051,9 +1039,6 @@
 			tmp_name = v->name;
 		queue_set_param(q, tmp_name, v->value, -1, 0);
 	}
-
-	if (q->strategy == QUEUE_STRATEGY_ROUNDROBIN)
-		rr_dep_warning();
 
 	/* Temporarily set non-dynamic members dead so we can detect deleted ones. */
 	for (m = q->members; m; m = m->next) {
@@ -2223,18 +2208,6 @@
 		/* Everyone equal, except for penalty */
 		tmp->metric = mem->penalty * 1000000;
 		break;
-	case QUEUE_STRATEGY_ROUNDROBIN:
-		if (!pos) {
-			if (!q->wrapped) {
-				/* No more channels, start over */
-				q->rrpos = 0;
-			} else {
-				/* Prioritize next entry */
-				q->rrpos++;
-			}
-			q->wrapped = 0;
-		}
-		/* Fall through */
 	case QUEUE_STRATEGY_RRMEMORY:
 		if (pos < q->rrpos) {
 			tmp->metric = 1000 + pos;
@@ -3813,9 +3786,6 @@
 						remove_from_interfaces(cur->interface);
 					}
 				}
-
-				if (q->strategy == QUEUE_STRATEGY_ROUNDROBIN)
-					rr_dep_warning();
 
 				if (new) {
 					AST_LIST_INSERT_HEAD(&queues, q, list);
@@ -4373,42 +4343,22 @@
 static char qrm_cmd_usage[] =
 "Usage: queue remove member <channel> from <queue>\n";
 
-static struct ast_cli_entry cli_show_queues_deprecated = {
-	{ "show", "queues", NULL },
-	queue_list, NULL,
-	NULL, NULL };
-
-static struct ast_cli_entry cli_show_queue_deprecated = {
-	{ "show", "queue", NULL },
-	queue_show, NULL,
-	NULL, complete_queue };
-
-static struct ast_cli_entry cli_add_queue_member_deprecated = {
-	{ "add", "queue", "member", NULL },
-	handle_queue_add_member, NULL,
-	NULL, complete_queue_add_member };
-
-static struct ast_cli_entry cli_remove_queue_member_deprecated = {
-	{ "remove", "queue", "member", NULL },
-	handle_queue_remove_member, NULL,
-	NULL, complete_queue_remove_member };
-
 static struct ast_cli_entry cli_queue[] = {
 	{ { "queue", "list", NULL },
 	queue_list, "Show status of queues",
-	queue_list_usage, NULL, &cli_show_queues_deprecated },
+	queue_list_usage, NULL, NULL },
 
 	{ { "queue", "show", NULL },
 	queue_show, "Show status of a specified queue",
-	queue_show_usage, complete_queue, &cli_show_queue_deprecated },
+	queue_show_usage, complete_queue, NULL },
 
 	{ { "queue", "add", "member", NULL },
 	handle_queue_add_member, "Add a channel to a specified queue",
-	qam_cmd_usage, complete_queue_add_member, &cli_add_queue_member_deprecated },
+	qam_cmd_usage, complete_queue_add_member, NULL },
 
 	{ { "queue", "remove", "member", NULL },
 	handle_queue_remove_member, "Removes a channel from a specified queue",
-	qrm_cmd_usage, complete_queue_remove_member, &cli_remove_queue_member_deprecated },
+	qrm_cmd_usage, complete_queue_remove_member, NULL },
 };
 
 static int unload_module(void)

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Thu Sep 21 16:17:39 2006
@@ -436,52 +436,6 @@
 		prof_data->e[i].events++;
 	}
 	return prof_data->e[i].mark;
-}
-
-static int handle_show_profile_deprecated(int fd, int argc, char *argv[])
-{
-	int i, min, max;
-	char *search = NULL;
-
-	if (prof_data == NULL)
-		return 0;
-
-	min = 0;
-	max = prof_data->entries;
-	if  (argc >= 3) { /* specific entries */
-		if (isdigit(argv[2][0])) {
-			min = atoi(argv[2]);
-			if (argc == 4 && strcmp(argv[3], "-"))
-				max = atoi(argv[3]);
-		} else
-			search = argv[2];
-	}
-	if (max > prof_data->entries)
-		max = prof_data->entries;
-	if (!strcmp(argv[0], "clear")) {
-		for (i= min; i < max; i++) {
-			if (!search || strstr(prof_data->e[i].name, search)) {
-				prof_data->e[i].value = 0;
-				prof_data->e[i].events = 0;
-			}
-		}
-		return 0;
-	}
-	ast_cli(fd, "profile values (%d, allocated %d)\n-------------------\n",
-		prof_data->entries, prof_data->max_size);
-	ast_cli(fd, "%6s   %8s  %10s %12s %12s  %s\n", "ID", "Scale", "Events",
-			"Value", "Average", "Name");
-	for (i = min; i < max; i++) {
-		struct profile_entry *e = &prof_data->e[i];
-		if (!search || strstr(prof_data->e[i].name, search))
-		    ast_cli(fd, "%6d: [%8ld] %10ld %12lld %12lld  %s\n",
-			i,
-			(long)e->scale,
-			(long)e->events, (long long)e->value,
-			(long long)(e->events ? e->value / e->events : e->value),
-			e->name);
-	}
-	return 0;
 }
 
 static int handle_show_profile(int fd, int argc, char *argv[])
@@ -1517,23 +1471,6 @@
 
 #define ASTERISK_PROMPT2 "%s*CLI> "
 
-#if !defined(LOW_MEMORY)
-static struct ast_cli_entry cli_show_version_files_deprecated = {
-	{ "show", "version", "files", NULL },
-	handle_show_version_files, NULL,
-	NULL, complete_show_version_files };
-
-static struct ast_cli_entry cli_show_profile_deprecated = {
-	{ "show", "profile", NULL },
-	handle_show_profile_deprecated, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_clear_profile_deprecated = {
-	{ "clear", "profile", NULL },
-	handle_show_profile_deprecated, NULL,
-	NULL };
-#endif /* ! LOW_MEMORY */
-
 static struct ast_cli_entry cli_asterisk[] = {
 	{ { "abort", "halt", NULL },
 	handle_abort_halt, "Cancel a running halt",
@@ -1581,7 +1518,7 @@
 #if !defined(LOW_MEMORY)
 	{ { "file", "list", "version", NULL },
 	handle_show_version_files, "List versions of files used to build Asterisk",
-	show_version_files_help, complete_show_version_files, &cli_show_version_files_deprecated },
+	show_version_files_help, complete_show_version_files },
 
 	{ { "show", "threads", NULL },
 	handle_show_threads, "Show running threads",
@@ -1589,11 +1526,11 @@
 
 	{ { "profile", "list", NULL },
 	handle_show_profile, "Display profiling info",
-	NULL, NULL, &cli_show_profile_deprecated },
+	NULL },
 
 	{ { "profile", "clear", NULL },
 	handle_show_profile, "Clear profiling info",
-	NULL, NULL, &cli_clear_profile_deprecated },
+	NULL },
 #endif /* ! LOW_MEMORY */
 };
 

Modified: trunk/main/astmm.c
URL: http://svn.digium.com/view/asterisk/trunk/main/astmm.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/astmm.c (original)
+++ trunk/main/astmm.c Thu Sep 21 16:17:39 2006
@@ -404,24 +404,14 @@
 "       Summarizes heap memory allocations by file, or optionally\n"
 "by function, if a file is specified\n";
 
-static struct ast_cli_entry cli_show_memory_allocations_deprecated = {
-	{ "show", "memory", "allocations", NULL },
-	handle_show_memory, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_memory_summary_deprecated = {
-	{ "show", "memory", "summary", NULL },
-	handle_show_memory_summary, NULL,
-	NULL };
-
 static struct ast_cli_entry cli_memory[] = {
 	{ { "memory", "show", "allocations", NULL },
 	handle_show_memory, "Display outstanding memory allocations",
-	show_memory_help, NULL, &cli_show_memory_allocations_deprecated },
+	show_memory_help },
 
 	{ { "memory", "show", "summary", NULL },
 	handle_show_memory_summary, "Summarize outstanding memory allocations",
-	show_memory_summary_help, NULL, &cli_show_memory_summary_deprecated },
+	show_memory_summary_help },
 };
 
 void __ast_mm_init(void)

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Thu Sep 21 16:17:39 2006
@@ -295,24 +295,14 @@
 "Usage: channeltype show <name>\n"
 "	Show details about the specified channel type, <name>.\n";
 
-static struct ast_cli_entry cli_show_channeltypes_deprecated = {
-	{ "show", "channeltypes", NULL },
-	show_channeltypes, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_channeltype_deprecated = {
-	{ "show", "channeltype", NULL },
-	show_channeltype, NULL,
-	NULL, complete_channeltypes };
-
 static struct ast_cli_entry cli_channel[] = {
 	{ { "channeltype", "list", NULL },
 	show_channeltypes, "List available channel types",
-	show_channeltypes_usage, NULL, &cli_show_channeltypes_deprecated },
+	show_channeltypes_usage },
 
 	{ { "channeltype", "show", NULL },
 	show_channeltype, "Give more details on that channel type",
-	show_channeltype_usage, complete_channeltypes, &cli_show_channeltype_deprecated },
+	show_channeltype_usage, complete_channeltypes },
 };
 
 /*! \brief Checks to see if a channel is needing hang up */

Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Thu Sep 21 16:17:39 2006
@@ -138,17 +138,6 @@
 "       Optional regular expression pattern is matched to group names for each\n"
 "       channel.\n";
 
-static int handle_load_deprecated(int fd, int argc, char *argv[])
-{
-	if (argc != 2)
-		return RESULT_SHOWUSAGE;
-	if (ast_load_resource(argv[1])) {
-		ast_cli(fd, "Unable to load module %s\n", argv[1]);
-		return RESULT_FAILURE;
-	}
-	return RESULT_SUCCESS;
-}
-
 static int handle_load(int fd, int argc, char *argv[])
 {
 	if (argc != 3)
@@ -157,29 +146,6 @@
 		ast_cli(fd, "Unable to load module %s\n", argv[2]);
 		return RESULT_FAILURE;
 	}
-	return RESULT_SUCCESS;
-}
-
-static int handle_reload_deprecated(int fd, int argc, char *argv[])
-{
-	int x;
-	int res;
-	if (argc < 1)
-		return RESULT_SHOWUSAGE;
-	if (argc > 1) { 
-		for (x=1;x<argc;x++) {
-			res = ast_module_reload(argv[x]);
-			switch(res) {
-			case 0:
-				ast_cli(fd, "No such module '%s'\n", argv[x]);
-				break;
-			case 1:
-				ast_cli(fd, "Module '%s' does not support reload\n", argv[x]);
-				break;
-			}
-		}
-	} else
-		ast_module_reload(NULL);
 	return RESULT_SUCCESS;
 }
 
@@ -206,33 +172,6 @@
 	return RESULT_SUCCESS;
 }
 
-static int handle_set_verbose_deprecated(int fd, int argc, char *argv[])
-{
-	int val = 0;
-	int oldval = option_verbose;
-
-	/* "set verbose [atleast] N" */
-	if (argc == 3)
-		option_verbose = atoi(argv[2]);
-	else if (argc == 4) {
-		if (strcasecmp(argv[2], "atleast"))
-			return RESULT_SHOWUSAGE;
-		val = atoi(argv[3]);
-		if (val > option_verbose)
-			option_verbose = val;
-	} else
-		return RESULT_SHOWUSAGE;
-
-	if (oldval != option_verbose && option_verbose > 0)
-		ast_cli(fd, "Verbosity was %d and is now %d\n", oldval, option_verbose);
-	else if (oldval > 0 && option_verbose > 0)
-		ast_cli(fd, "Verbosity is at least %d\n", option_verbose);
-	else if (oldval > 0 && option_verbose == 0)
-		ast_cli(fd, "Verbosity is now OFF\n");
-
-	return RESULT_SUCCESS;
-}
-
 static int handle_verbose(int fd, int argc, char *argv[])
 {
 	int oldval = option_verbose;
@@ -250,33 +189,6 @@
 		else
 			ast_cli(fd, "Verbosity was %d and is now %d\n", oldval, option_verbose);
 	}
-
-	return RESULT_SUCCESS;
-}
-
-static int handle_set_debug_deprecated(int fd, int argc, char *argv[])
-{
-	int val = 0;
-	int oldval = option_debug;
-
-	/* "set debug [atleast] N" */
-	if (argc == 3)
-		option_debug = atoi(argv[2]);
-	else if (argc == 4) {
-		if (strcasecmp(argv[2], "atleast"))
-			return RESULT_SHOWUSAGE;
-		val = atoi(argv[3]);
-		if (val > option_debug)
-			option_debug = val;
-	} else
-		return RESULT_SHOWUSAGE;
-
-	if (oldval != option_debug && option_debug > 0)
-		ast_cli(fd, "Core debug was %d and is now %d\n", oldval, option_debug);
-	else if (oldval > 0 && option_debug > 0)
-		ast_cli(fd, "Core debug is at least %d\n", option_debug);
-	else if (oldval > 0 && option_debug == 0)
-		ast_cli(fd, "Core debug is now OFF\n");
 
 	return RESULT_SUCCESS;
 }
@@ -335,58 +247,11 @@
 	return RESULT_SUCCESS;
 }
 
-static int handle_debuglevel_deprecated(int fd, int argc, char *argv[])
-{
-	int newlevel;
-	char *filename = "<any>";
-	if ((argc < 3) || (argc > 4))
-		return RESULT_SHOWUSAGE;
-	if (sscanf(argv[2], "%d", &newlevel) != 1)
-		return RESULT_SHOWUSAGE;
-	option_debug = newlevel;
-	if (argc == 4) {
-		filename = argv[3];
-		ast_copy_string(debug_filename, filename, sizeof(debug_filename));
-	} else {
-		debug_filename[0] = '\0';
-	}
-	ast_cli(fd, "Debugging level set to %d, file '%s'\n", newlevel, filename);
-	return RESULT_SUCCESS;
-}
-
 static int handle_logger_mute(int fd, int argc, char *argv[])
 {
 	if (argc != 2)
 		return RESULT_SHOWUSAGE;
 	ast_console_toggle_mute(fd);
-	return RESULT_SUCCESS;
-}
-
-static int handle_unload_deprecated(int fd, int argc, char *argv[])
-{
-	int x;
-	int force=AST_FORCE_SOFT;
-	if (argc < 2)
-		return RESULT_SHOWUSAGE;
-	for (x=1;x<argc;x++) {
-		if (argv[x][0] == '-') {
-			switch(argv[x][1]) {
-			case 'f':
-				force = AST_FORCE_FIRM;
-				break;
-			case 'h':
-				force = AST_FORCE_HARD;
-				break;
-			default:
-				return RESULT_SHOWUSAGE;
-			}
-		} else if (x !=  argc - 1) 
-			return RESULT_SHOWUSAGE;
-		else if (ast_unload_resource(argv[x], force)) {
-			ast_cli(fd, "Unable to unload resource %s\n", argv[x]);
-			return RESULT_FAILURE;
-		}
-	}
 	return RESULT_SUCCESS;
 }
 
@@ -775,38 +640,6 @@
 	return RESULT_SUCCESS;
 }
 
-static int handle_nodebugchan_deprecated(int fd, int argc, char *argv[])
-{
-	struct ast_channel *c=NULL;
-	int is_all;
-	/* 'no debug channel {all|chan_id}' */
-	if (argc != 4)
-		return RESULT_SHOWUSAGE;
-	is_all = !strcasecmp("all", argv[3]);
-	if (is_all) {
-		global_fin &= ~DEBUGCHAN_FLAG;
-		global_fout &= ~DEBUGCHAN_FLAG;
-		c = ast_channel_walk_locked(NULL);
-	} else {
-		c = ast_get_channel_by_name_locked(argv[3]);
-		if (c == NULL)
-			ast_cli(fd, "No such channel %s\n", argv[3]);
-	}
-	while(c) {
-		if ((c->fin & DEBUGCHAN_FLAG) || (c->fout & DEBUGCHAN_FLAG)) {
-			c->fin &= ~DEBUGCHAN_FLAG;
-			c->fout &= ~DEBUGCHAN_FLAG;
-			ast_cli(fd, "Debugging disabled on channel %s\n", c->name);
-		}
-		ast_channel_unlock(c);
-		if (!is_all)
-			break;
-		c = ast_channel_walk_locked(c);
-	}
-	ast_cli(fd, "Debugging on new channels is disabled\n");
-	return RESULT_SUCCESS;
-}
-		
 static int handle_nodebugchan(int fd, int argc, char *argv[])
 {
 	struct ast_channel *c=NULL;
@@ -972,21 +805,6 @@
 	return ast_complete_channels(line, word, pos, state, 2);
 }
 
-static char *complete_ch_4(const char *line, const char *word, int pos, int state)
-{
-	return ast_complete_channels(line, word, pos, state, 3);
-}
-
-static char *complete_mod_2_nr(const char *line, const char *word, int pos, int state)
-{
-	return ast_module_helper(line, word, pos, state, 1, 0);
-}
-
-static char *complete_mod_2(const char *line, const char *word, int pos, int state)
-{
-	return ast_module_helper(line, word, pos, state, 1, 1);
-}
-
 static char *complete_mod_3_nr(const char *line, const char *word, int pos, int state)
 {
 	return ast_module_helper(line, word, pos, state, 2, 0);
@@ -1000,27 +818,6 @@
 static char *complete_mod_4(const char *line, const char *word, int pos, int state)
 {
 	return ast_module_helper(line, word, pos, state, 3, 0);
-}
-
-static char *complete_fn_deprecated(const char *line, const char *word, int pos, int state)
-{
-	char *c;
-	char filename[256];
-
-	if (pos != 1)
-		return NULL;
-	
-	if (word[0] == '/')
-		ast_copy_string(filename, word, sizeof(filename));
-	else
-		snprintf(filename, sizeof(filename), "%s/%s", ast_config_AST_MODULE_DIR, word);
-	
-	c = filename_completion_function(filename, state);
-	
-	if (c && word[0] != '/')
-		c += (strlen(ast_config_AST_MODULE_DIR) + 1);
-	
-	return c ? strdup(c) : c;
 }
 
 static char *complete_fn(const char *line, const char *word, int pos, int state)
@@ -1128,91 +925,26 @@
 	{ { NULL }, NULL, NULL, NULL }
 };
 
-static struct ast_cli_entry cli_debug_channel_deprecated = {
-	{ "debug", "channel", NULL },
-	handle_debugchan, NULL,
-	NULL, complete_ch_3 };
-
-static struct ast_cli_entry cli_debug_level_deprecated = {
-	{ "debug", "level", NULL },
-	handle_debuglevel_deprecated, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_group_show_channels_deprecated = {
-	{ "group", "show", "channels", NULL },
-	group_show_channels, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_load_deprecated = {
-	{ "load", NULL },
-	handle_load_deprecated, NULL,
-	NULL, complete_fn_deprecated };
-
-static struct ast_cli_entry cli_no_debug_channel_deprecated = {
-	{ "no", "debug", "channel", NULL },
-	handle_nodebugchan_deprecated, NULL,
-	NULL, complete_ch_4 };
-
-static struct ast_cli_entry cli_reload_deprecated = {
-	{ "reload", NULL },
-	handle_reload_deprecated, NULL,
-	NULL, complete_mod_2 };
-
-static struct ast_cli_entry cli_set_debug_deprecated = {
-	{ "set", "debug", NULL },
-	handle_set_debug_deprecated, NULL,
-	NULL, NULL, &cli_debug_level_deprecated };
-
-static struct ast_cli_entry cli_set_verbose_deprecated = {
-	{ "set", "verbose", NULL },
-	handle_set_verbose_deprecated, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_channel_deprecated = {
-	{ "show", "channel", NULL },
-	handle_showchan, NULL,
-	NULL, complete_ch_3 };
-
-static struct ast_cli_entry cli_show_channels_deprecated = {
-	{ "show", "channels", NULL },
-	handle_chanlist, NULL,
-	NULL, complete_show_channels };
-
-static struct ast_cli_entry cli_show_modules_deprecated = {
-	{ "show", "modules", NULL },
-	handle_modlist, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_modules_like_deprecated = {
-	{ "show", "modules", "like", NULL },
-	handle_modlist, NULL,
-	NULL, complete_mod_4 };
-
-static struct ast_cli_entry cli_unload_deprecated = {
-	{ "unload", NULL },
-	handle_unload_deprecated, NULL,
-	NULL, complete_mod_2_nr };
-
 static struct ast_cli_entry cli_cli[] = {
 	{ { "channel", "list", NULL },
 	handle_chanlist, "Display information on channels",
-	chanlist_help, complete_show_channels, &cli_show_channels_deprecated },
+	chanlist_help, complete_show_channels },
 
 	{ { "channel", "show", NULL },
 	handle_showchan, "Display information on a specific channel",
-	showchan_help, complete_ch_3, &cli_show_channel_deprecated },
+	showchan_help, complete_ch_3 },
 
 	{ { "channel", "debug", NULL },
 	handle_debugchan, "Enable debugging on a channel",
-	debugchan_help, complete_ch_3, &cli_debug_channel_deprecated },
+	debugchan_help, complete_ch_3 },
 
 	{ { "channel", "nodebug", NULL },
 	handle_nodebugchan, "Disable debugging on a channel",
-	nodebugchan_help, complete_ch_3, &cli_no_debug_channel_deprecated },
+	nodebugchan_help, complete_ch_3 },
 
 	{ { "core", "debug", NULL },
 	handle_debug, "Set level of debug chattiness",
-	debug_help, NULL, &cli_set_debug_deprecated },
+	debug_help },
 
 	{ { "core", "nodebug", NULL },
 	handle_nodebug, "Turns off debug chattiness",
@@ -1220,11 +952,11 @@
 
 	{ { "core", "verbose", NULL },
 	handle_verbose, "Set level of verboseness",
-	verbose_help, NULL, &cli_set_verbose_deprecated },
+	verbose_help },
 
 	{ { "group", "list", "channels", NULL },
 	group_show_channels, "Display active channels with group(s)",
-	group_show_channels_help, NULL, &cli_group_show_channels_deprecated },
+	group_show_channels_help },
 
 	{ { "help", NULL },
 	handle_help, "Display help list, or specific help on a command",
@@ -1236,23 +968,23 @@
 
 	{ { "module", "list", NULL },
 	handle_modlist, "List modules and info",
-	modlist_help, NULL, &cli_show_modules_deprecated },
+	modlist_help },
 
 	{ { "module", "list", "like", NULL },
 	handle_modlist, "List modules and info",
-	modlist_help, complete_mod_4, &cli_show_modules_like_deprecated },
+	modlist_help, complete_mod_4 },
 
 	{ { "module", "load", NULL },
 	handle_load, "Load a module by name",
-	load_help, complete_fn, &cli_load_deprecated },
+	load_help, complete_fn },
 
 	{ { "module", "reload", NULL },
 	handle_reload, "Reload configuration",
-	reload_help, complete_mod_3, &cli_reload_deprecated },
+	reload_help, complete_mod_3 },
 
 	{ { "module", "unload", NULL },
 	handle_unload, "Unload a module by name",
-	unload_help, complete_mod_3_nr, &cli_unload_deprecated },
+	unload_help, complete_mod_3_nr },
 
  	{ { "show", "uptime", NULL },
 	handle_showuptime, "Show uptime information",

Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Thu Sep 21 16:17:39 2006
@@ -1235,15 +1235,10 @@
 	"Usage: core list config mappings\n"
 	"	Shows the filenames to config engines.\n";
 
-static struct ast_cli_entry cli_show_config_mappings_deprecated = {
-	{ "show", "config", "mappings", NULL },
-	config_command, NULL,
-	NULL };
-
 static struct ast_cli_entry cli_config[] = {
 	{ { "core", "list", "config", "mappings", NULL },
 	config_command, "Display config mappings (file names to config engines)",
-	show_config_help, NULL, &cli_show_config_mappings_deprecated },
+	show_config_help },
 };
 
 int register_config_cli() 

Modified: trunk/main/file.c
URL: http://svn.digium.com/view/asterisk/trunk/main/file.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/file.c (original)
+++ trunk/main/file.c Thu Sep 21 16:17:39 2006
@@ -1152,15 +1152,10 @@
 "Usage: core list file formats\n"
 "       Displays currently registered file formats (if any)\n";
 
-struct ast_cli_entry cli_show_file_formats_deprecated = {
-	{ "show", "file", "formats" },
-	show_file_formats, NULL,
-	NULL };
-
 struct ast_cli_entry cli_file[] = {
 	{ { "file", "list", "formats" },
 	show_file_formats, "Displays file formats",
-	show_file_formats_usage, NULL, &cli_show_file_formats_deprecated },
+	show_file_formats_usage },
 };
 
 int ast_file_init(void)

Modified: trunk/main/frame.c
URL: http://svn.digium.com/view/asterisk/trunk/main/frame.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/frame.c (original)
+++ trunk/main/frame.c Thu Sep 21 16:17:39 2006
@@ -595,50 +595,6 @@
 	return ret;
 }
 
-static int show_codecs_deprecated(int fd, int argc, char *argv[])
-{
-	int i, found=0;
-	char hex[25];
-	
-	if ((argc < 2) || (argc > 3))
-		return RESULT_SHOWUSAGE;
-
-	if (!ast_opt_dont_warn)
-		ast_cli(fd, "Disclaimer: this command is for informational purposes only.\n"
-				"\tIt does not indicate anything about your configuration.\n");
-
-	ast_cli(fd, "%11s %9s %10s   TYPE   %8s   %s\n","INT","BINARY","HEX","NAME","DESC");
-	ast_cli(fd, "--------------------------------------------------------------------------------\n");
-	if ((argc == 2) || (!strcasecmp(argv[1],"audio"))) {
-		found = 1;
-		for (i=0;i<12;i++) {
-			snprintf(hex,25,"(0x%x)",1<<i);
-			ast_cli(fd, "%11u (1 << %2d) %10s  audio   %8s   (%s)\n",1 << i,i,hex,ast_getformatname(1<<i),ast_codec2str(1<<i));
-		}
-	}
-
-	if ((argc == 2) || (!strcasecmp(argv[1],"image"))) {
-		found = 1;
-		for (i=16;i<18;i++) {
-			snprintf(hex,25,"(0x%x)",1<<i);
-			ast_cli(fd, "%11u (1 << %2d) %10s  image   %8s   (%s)\n",1 << i,i,hex,ast_getformatname(1<<i),ast_codec2str(1<<i));
-		}
-	}
-
-	if ((argc == 2) || (!strcasecmp(argv[1],"video"))) {
-		found = 1;
-		for (i=18;i<22;i++) {
-			snprintf(hex,25,"(0x%x)",1<<i);
-			ast_cli(fd, "%11u (1 << %2d) %10s  video   %8s   (%s)\n",1 << i,i,hex,ast_getformatname(1<<i),ast_codec2str(1<<i));
-		}
-	}
-
-	if (! found)
-		return RESULT_SHOWUSAGE;
-	else
-		return RESULT_SUCCESS;
-}
-
 static int show_codecs(int fd, int argc, char *argv[])
 {
 	int i, found=0;
@@ -686,28 +642,6 @@
 static char frame_show_codecs_usage[] =
 "Usage: core list codecs [audio|video|image]\n"
 "       Displays codec mapping\n";
-
-static int show_codec_n_deprecated(int fd, int argc, char *argv[])
-{
-	int codec, i, found=0;
-
-	if (argc != 3)
-		return RESULT_SHOWUSAGE;
-
-	if (sscanf(argv[2],"%d",&codec) != 1)
-		return RESULT_SHOWUSAGE;
-
-	for (i = 0; i < 32; i++)
-		if (codec & (1 << i)) {
-			found = 1;
-			ast_cli(fd, "%11u (1 << %2d)  %s\n",1 << i,i,ast_codec2str(1<<i));
-		}
-
-	if (!found)
-		ast_cli(fd, "Codec %d not found\n", codec);
-
-	return RESULT_SUCCESS;
-}
 
 static int show_codec_n(int fd, int argc, char *argv[])
 {
@@ -917,23 +851,6 @@
 
 
 #ifdef TRACE_FRAMES
-static int show_frame_stats_deprecated(int fd, int argc, char *argv[])
-{
-	struct ast_frame *f;
-	int x=1;
-	if (argc != 3)
-		return RESULT_SHOWUSAGE;
-	AST_LIST_LOCK(&headerlist);
-	ast_cli(fd, "     Framer Statistics     \n");
-	ast_cli(fd, "---------------------------\n");
-	ast_cli(fd, "Total allocated headers: %d\n", headers);
-	ast_cli(fd, "Queue Dump:\n");
-	AST_LIST_TRAVERSE(&headerlist, f, frame_list)
-		ast_cli(fd, "%d.  Type %d, subclass %d from %s\n", x++, f->frametype, f->subclass, f->src ? f->src : "<Unknown>");
-	AST_LIST_UNLOCK(&headerlist);
-	return RESULT_SUCCESS;
-}
-
 static int show_frame_stats(int fd, int argc, char *argv[])
 {
 	struct ast_frame *f;
@@ -957,63 +874,31 @@
 #endif
 
 /* Builtin Asterisk CLI-commands for debugging */
-static struct ast_cli_entry cli_show_codecs = {
-	{ "show", "codecs", NULL },
-	show_codecs_deprecated, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_audio_codecs = {
-	{ "show", "audio", "codecs", NULL },
-	show_codecs_deprecated, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_video_codecs = {
-	{ "show", "video", "codecs", NULL },
-	show_codecs_deprecated, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_image_codecs = {
-	{ "show", "image", "codecs", NULL },
-	show_codecs_deprecated, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_codec = {
-	{ "show", "codec", NULL },
-	show_codec_n_deprecated, NULL,
-	NULL };
-
-#ifdef TRACE_FRAMES
-static struct ast_cli_entry cli_show_frame_stats = {
-	{ "show", "frame", "stats", NULL },
-	show_frame_stats, NULL,
-	NULL };
-#endif
-
 static struct ast_cli_entry my_clis[] = {
 	{ { "core", "list", "codecs", NULL },
 	show_codecs, "Displays a list of codecs",
-	frame_show_codecs_usage, NULL, &cli_show_codecs },
+	frame_show_codecs_usage },
 
 	{ { "core", "list", "codecs", "audio", NULL },
 	show_codecs, "Displays a list of audio codecs",
-	frame_show_codecs_usage, NULL, &cli_show_audio_codecs },
+	frame_show_codecs_usage },
 
 	{ { "core", "list", "codecs", "video", NULL },
 	show_codecs, "Displays a list of video codecs",
-	frame_show_codecs_usage, NULL, &cli_show_video_codecs },
+	frame_show_codecs_usage },
 
 	{ { "core", "list", "codecs", "image", NULL },
 	show_codecs, "Displays a list of image codecs",
-	frame_show_codecs_usage, NULL, &cli_show_image_codecs },
+	frame_show_codecs_usage },
 
 	{ { "core", "show", "codec", NULL },
 	show_codec_n, "Shows a specific codec",
-	frame_show_codec_n_usage, NULL, &cli_show_codec },
+	frame_show_codec_n_usage },
 
 #ifdef TRACE_FRAMES
 	{ { "core", "show", "frame", "stats", NULL },
 	show_frame_stats, "Shows frame statistics",
-	frame_stats_usage, NULL, &cli_show_frame_stats },
+	frame_stats_usage },
 #endif
 };
 

Modified: trunk/main/http.c
URL: http://svn.digium.com/view/asterisk/trunk/main/http.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Thu Sep 21 16:17:39 2006
@@ -684,15 +684,10 @@
 "Usage: http list status\n"
 "       Lists status of internal HTTP engine\n";
 
-static struct ast_cli_entry cli_http_show_status_deprecated = {
-	{ "http", "show", "status", NULL },
-	handle_show_http, NULL,
-	NULL };
-
 static struct ast_cli_entry cli_http[] = {
 	{ { "http", "list", "status", NULL },
 	handle_show_http, "Display HTTP server status",
-	show_http_help, NULL, &cli_http_show_status_deprecated },
+	show_http_help },
 };
 
 int ast_http_init(void)

Modified: trunk/main/image.c
URL: http://svn.digium.com/view/asterisk/trunk/main/image.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/image.c (original)
+++ trunk/main/image.c Thu Sep 21 16:17:39 2006
@@ -180,19 +180,6 @@
 	return res;
 }
 
-static int show_image_formats_deprecated(int fd, int argc, char *argv[])
-{
-#define FORMAT "%10s %10s %50s %10s\n"
-#define FORMAT2 "%10s %10s %50s %10s\n"
-	struct ast_imager *i;
-	if (argc != 3)
-		return RESULT_SHOWUSAGE;
-	ast_cli(fd, FORMAT, "Name", "Extensions", "Description", "Format");
-	AST_LIST_TRAVERSE(&imagers, i, list)
-		ast_cli(fd, FORMAT2, i->name, i->exts, i->desc, ast_getformatname(i->format));
-	return RESULT_SUCCESS;
-}
-
 static int show_image_formats(int fd, int argc, char *argv[])
 {
 #define FORMAT "%10s %10s %50s %10s\n"
@@ -206,16 +193,11 @@
 	return RESULT_SUCCESS;
 }
 
-struct ast_cli_entry cli_show_image_formats_deprecated = {
-	{ "show", "image", "formats" },
-	show_image_formats_deprecated, NULL,
-	NULL };
-
 struct ast_cli_entry cli_image[] = {
 	{ { "file", "list", "formats", "image" },
 	show_image_formats, "Displays image formats",
 	"Usage: file list formats image\n"
-	"       displays currently registered image formats (if any)\n", NULL, &cli_show_image_formats_deprecated },
+	"       displays currently registered image formats (if any)\n" },
 };
 
 int ast_image_init(void)

Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Thu Sep 21 16:17:39 2006
@@ -557,15 +557,10 @@
 "Usage: logger list channels\n"
 "       List configured logger channels.\n";
 
-static struct ast_cli_entry cli_logger_show_channels_deprecated = {
-	{ "logger", "show", "channels", NULL }, 
-	handle_logger_show_channels, NULL,
-	NULL };
-
 static struct ast_cli_entry cli_logger[] = {
 	{ { "logger", "list", "channels", NULL }, 
 	handle_logger_show_channels, "List configured log channels",
-	logger_show_channels_help, NULL, &cli_logger_show_channels_deprecated },
+	logger_show_channels_help },
 
 	{ { "logger", "reload", NULL }, 
 	handle_logger_reload, "Reopens the log files",

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Thu Sep 21 16:17:39 2006
@@ -601,42 +601,22 @@
 " Usage: manager show user <user>\n"
 "        Display all information related to the manager user specified.\n";
 
-static struct ast_cli_entry cli_show_manager_command_deprecated = {
-	{ "show", "manager", "command", NULL },
-	handle_showmancmd, NULL,
-	NULL, complete_show_mancmd };
-
-static struct ast_cli_entry cli_show_manager_commands_deprecated = {
-	{ "show", "manager", "commands", NULL },
-	handle_showmancmds, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_manager_connected_deprecated = {
-	{ "show", "manager", "connected", NULL },
-	handle_showmanconn, NULL,
-	NULL };
-
-static struct ast_cli_entry cli_show_manager_eventq_deprecated = {
-	{ "show", "manager", "eventq", NULL },
-	handle_showmaneventq, NULL,
-	NULL };
-
 static struct ast_cli_entry cli_manager[] = {
 	{ { "manager", "show", "command", NULL },
 	handle_showmancmd, "Show a manager interface command",
-	showmancmd_help, complete_show_mancmd, &cli_show_manager_command_deprecated },
+	showmancmd_help, complete_show_mancmd },
 
 	{ { "manager", "list", "commands", NULL },
 	handle_showmancmds, "List manager interface commands",
-	showmancmds_help, NULL, &cli_show_manager_commands_deprecated },
+	showmancmds_help },
 
 	{ { "manager", "list", "connected", NULL },
 	handle_showmanconn, "List connected manager interface users",
-	showmanconn_help, NULL, &cli_show_manager_connected_deprecated },
+	showmanconn_help },
 
 	{ { "manager", "list", "eventq", NULL },
 	handle_showmaneventq, "List manager interface queued events",
-	showmaneventq_help, NULL, &cli_show_manager_eventq_deprecated },
+	showmaneventq_help },
 
 	{ { "manager", "list", "users", NULL },
 	handle_showmanagers, "List configured manager users",

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?rev=43449&r1=43448&r2=43449&view=diff
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Sep 21 16:17:39 2006
@@ -1201,36 +1201,6 @@
 	}
 }
 
-/*! \brief CLI function to show installed custom functions
-    \addtogroup CLI_functions
- */
-static int handle_show_functions_deprecated(int fd, int argc, char *argv[])
-{
-	struct ast_custom_function *acf;
-	int count_acf = 0;
-	int like = 0;
-
-	if (argc == 4 && (!strcmp(argv[2], "like")) ) {
-		like = 1;
-	} else if (argc != 2) {
-		return RESULT_SHOWUSAGE;
-	}
-
-	ast_cli(fd, "%s Custom Functions:\n--------------------------------------------------------------------------------\n", like ? "Matching" : "Installed");
-
-	AST_LIST_LOCK(&acf_root);
-	AST_LIST_TRAVERSE(&acf_root, acf, acflist) {
-		if (!like || strstr(acf->name, argv[3])) {
-			count_acf++;
-			ast_cli(fd, "%-20.20s  %-35.35s  %s\n", acf->name, acf->syntax, acf->synopsis);
-		}
-	}
-	AST_LIST_UNLOCK(&acf_root);
-
-	ast_cli(fd, "%d %scustom functions installed.\n", count_acf, like ? "matching " : "");
-
-	return RESULT_SUCCESS;
-}
 static int handle_show_functions(int fd, int argc, char *argv[])
 {
 	struct ast_custom_function *acf;
@@ -1255,62 +1225,6 @@
 	AST_LIST_UNLOCK(&acf_root);
 
 	ast_cli(fd, "%d %scustom functions installed.\n", count_acf, like ? "matching " : "");
-
-	return RESULT_SUCCESS;
-}
-
-static int handle_show_function_deprecated(int fd, int argc, char *argv[])
-{
-	struct ast_custom_function *acf;
-	/* Maximum number of characters added by terminal coloring is 22 */
-	char infotitle[64 + AST_MAX_APP + 22], syntitle[40], destitle[40];
-	char info[64 + AST_MAX_APP], *synopsis = NULL, *description = NULL;
-	char stxtitle[40], *syntax = NULL;
-	int synopsis_size, description_size, syntax_size;
-
-	if (argc < 3)
-		return RESULT_SHOWUSAGE;
-
-	if (!(acf = ast_custom_function_find(argv[2]))) {
-		ast_cli(fd, "No function by that name registered.\n");
-		return RESULT_FAILURE;
-
-	}
-
-	if (acf->synopsis)
-		synopsis_size = strlen(acf->synopsis) + 23;
-	else
-		synopsis_size = strlen("Not available") + 23;
-	synopsis = alloca(synopsis_size);
-
-	if (acf->desc)
-		description_size = strlen(acf->desc) + 23;
-	else
-		description_size = strlen("Not available") + 23;
-	description = alloca(description_size);
-
-	if (acf->syntax)
-		syntax_size = strlen(acf->syntax) + 23;
-	else
-		syntax_size = strlen("Not available") + 23;
-	syntax = alloca(syntax_size);
-
-	snprintf(info, 64 + AST_MAX_APP, "\n  -= Info about function '%s' =- \n\n", acf->name);
-	term_color(infotitle, info, COLOR_MAGENTA, 0, 64 + AST_MAX_APP + 22);
-	term_color(stxtitle, "[Syntax]\n", COLOR_MAGENTA, 0, 40);
-	term_color(syntitle, "[Synopsis]\n", COLOR_MAGENTA, 0, 40);
-	term_color(destitle, "[Description]\n", COLOR_MAGENTA, 0, 40);
-	term_color(syntax,
-		   acf->syntax ? acf->syntax : "Not available",
-		   COLOR_CYAN, 0, syntax_size);
-	term_color(synopsis,
-		   acf->synopsis ? acf->synopsis : "Not available",
-		   COLOR_CYAN, 0, synopsis_size);
-	term_color(description,
-		   acf->desc ? acf->desc : "Not available",
-		   COLOR_CYAN, 0, description_size);
-
-	ast_cli(fd,"%s%s%s\n\n%s%s\n\n%s%s\n", infotitle, stxtitle, syntax, syntitle, synopsis, destitle, description);
 
 	return RESULT_SUCCESS;
 }
@@ -3026,76 +2940,6 @@
 	return ret;
 }
 
-static int handle_show_application_deprecated(int fd, int argc, char *argv[])
-{
-	struct ast_app *a;
-	int app, no_registered_app = 1;
-
-	if (argc < 3)
-		return RESULT_SHOWUSAGE;
-
-	/* ... go through all applications ... */
-	AST_LIST_LOCK(&apps);
-	AST_LIST_TRAVERSE(&apps, a, list) {
-		/* ... compare this application name with all arguments given
-		 * to 'show application' command ... */
-		for (app = 2; app < argc; app++) {
-			if (!strcasecmp(a->name, argv[app])) {
-				/* Maximum number of characters added by terminal coloring is 22 */
-				char infotitle[64 + AST_MAX_APP + 22], syntitle[40], destitle[40];
-				char info[64 + AST_MAX_APP], *synopsis = NULL, *description = NULL;
-				int synopsis_size, description_size;
-
-				no_registered_app = 0;
-
-				if (a->synopsis)
-					synopsis_size = strlen(a->synopsis) + 23;
-				else
-					synopsis_size = strlen("Not available") + 23;
-				synopsis = alloca(synopsis_size);
-
-				if (a->description)
-					description_size = strlen(a->description) + 23;
-				else
-					description_size = strlen("Not available") + 23;
-				description = alloca(description_size);
-
-				if (synopsis && description) {
-					snprintf(info, 64 + AST_MAX_APP, "\n  -= Info about application '%s' =- \n\n", a->name);
-					term_color(infotitle, info, COLOR_MAGENTA, 0, 64 + AST_MAX_APP + 22);
-					term_color(syntitle, "[Synopsis]\n", COLOR_MAGENTA, 0, 40);
-					term_color(destitle, "[Description]\n", COLOR_MAGENTA, 0, 40);
-					term_color(synopsis,
-									a->synopsis ? a->synopsis : "Not available",
-									COLOR_CYAN, 0, synopsis_size);
-					term_color(description,
-									a->description ? a->description : "Not available",
-									COLOR_CYAN, 0, description_size);
-
-					ast_cli(fd,"%s%s%s\n\n%s%s\n", infotitle, syntitle, synopsis, destitle, description);
-				} else {
-					/* ... one of our applications, show info ...*/
-					ast_cli(fd,"\n  -= Info about application '%s' =- \n\n"
-						"[Synopsis]\n  %s\n\n"
-						"[Description]\n%s\n",
-						a->name,
-						a->synopsis ? a->synopsis : "Not available",
-						a->description ? a->description : "Not available");
-				}
-			}
-		}
-	}
-	AST_LIST_UNLOCK(&apps);
-
-	/* we found at least one app? no? */
-	if (no_registered_app) {
-		ast_cli(fd, "Your application(s) is (are) not registered\n");
-		return RESULT_FAILURE;
-	}
-
-	return RESULT_SUCCESS;
-}
-
 static int handle_show_application(int fd, int argc, char *argv[])
 {
 	struct ast_app *a;
@@ -3220,77 +3064,6 @@
 	return RESULT_SUCCESS;
 }
 
-/*
- * 'show applications' CLI command implementation functions ...
- */
-static int handle_show_applications_deprecated(int fd, int argc, char *argv[])
-{
-	struct ast_app *a;
-	int like = 0, describing = 0;

[... 612 lines stripped ...]


More information about the asterisk-commits mailing list