aboutsummaryrefslogtreecommitdiffstats
path: root/main/frame.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-21 21:17:39 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-21 21:17:39 +0000
commit33d8fe4c3e3958f1be6b9587ce419f5b8eaae728 (patch)
treef363c53cb57dcc4f7096ee473679d70a1bf1dae7 /main/frame.c
parenta8a88e0f99de4ad1809685f6df832d71fbb22cfa (diff)
Remove deprecated CLI apps from the core
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43449 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/frame.c')
-rw-r--r--main/frame.c127
1 files changed, 6 insertions, 121 deletions
diff --git a/main/frame.c b/main/frame.c
index ad747abda..a95ba68ef 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -595,50 +595,6 @@ char *ast_codec2str(int codec)
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;
@@ -687,28 +643,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[])
{
int codec, i, found=0;
@@ -917,23 +851,6 @@ void ast_frame_dump(const char *name, struct ast_frame *f, char *prefix)
#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 @@ static char frame_stats_usage[] =
#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
};