diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 23:49:13 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 23:49:13 +0000 |
commit | 37c4cd900630f4bdf2a584030a8527a9c89dd7b8 (patch) | |
tree | 9335be1d860822d8f2f9c203b8afd5c9ddf540a6 /main/rtp.c | |
parent | c771976500a03e9be6ca67f3c3ccc31f6c32f232 (diff) |
More changes making the CLI more consistent with "category verb arguments" (continuation of issue 8236)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47053 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r-- | main/rtp.c | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/main/rtp.c b/main/rtp.c index 83e3ac357..cec9922fd 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -3269,18 +3269,9 @@ static int rtcp_do_stats(int fd, int argc, char *argv[]) { return RESULT_SUCCESS; } -static int rtp_no_debug_deprecated(int fd, int argc, char *argv[]) -{ - if (argc != 3) - return RESULT_SHOWUSAGE; - rtpdebug = 0; - ast_cli(fd,"RTP Debugging Disabled\n"); - return RESULT_SUCCESS; -} - static int rtp_no_debug(int fd, int argc, char *argv[]) { - if (argc != 2) + if (argc != 3) return RESULT_SHOWUSAGE; rtpdebug = 0; ast_cli(fd,"RTP Debugging Disabled\n"); @@ -3298,7 +3289,7 @@ static int rtcp_no_debug_deprecated(int fd, int argc, char *argv[]) static int rtcp_no_debug(int fd, int argc, char *argv[]) { - if (argc != 2) + if (argc != 3) return RESULT_SHOWUSAGE; rtcpdebug = 0; ast_cli(fd,"RTCP Debugging Disabled\n"); @@ -3316,7 +3307,7 @@ static int rtcp_no_stats_deprecated(int fd, int argc, char *argv[]) static int rtcp_no_stats(int fd, int argc, char *argv[]) { - if (argc != 2) + if (argc != 3) return RESULT_SHOWUSAGE; rtcpstats = 0; ast_cli(fd,"RTCP Stats Disabled\n"); @@ -3333,21 +3324,12 @@ static int stun_do_debug(int fd, int argc, char *argv[]) return RESULT_SUCCESS; } -static int stun_no_debug_deprecated(int fd, int argc, char *argv[]) -{ - if (argc != 3) - return RESULT_SHOWUSAGE; - stundebug = 0; - ast_cli(fd,"STUN Debugging Disabled\n"); - return RESULT_SUCCESS; -} - static int stun_no_debug(int fd, int argc, char *argv[]) { - if (argc != 2) + if (argc != 3) return RESULT_SHOWUSAGE; stundebug = 0; - ast_cli(fd,"STUN Debugging Disabled\n"); + ast_cli(fd, "STUN Debugging Disabled\n"); return RESULT_SUCCESS; } @@ -3356,7 +3338,7 @@ static char debug_usage[] = " Enable dumping of all RTP packets to and from host.\n"; static char no_debug_usage[] = - "Usage: rtp nodebug\n" + "Usage: rtp debug off\n" " Disable all RTP debugging\n"; static char stun_debug_usage[] = @@ -3364,7 +3346,7 @@ static char stun_debug_usage[] = " Enable STUN (Simple Traversal of UDP through NATs) debugging\n"; static char stun_no_debug_usage[] = - "Usage: stun nodebug\n" + "Usage: stun debug off\n" " Disable STUN debugging\n"; static char rtcp_debug_usage[] = @@ -3372,7 +3354,7 @@ static char rtcp_debug_usage[] = " Enable dumping of all RTCP packets to and from host.\n"; static char rtcp_no_debug_usage[] = - "Usage: rtcp nodebug\n" + "Usage: rtcp debug off\n" " Disable all RTCP debugging\n"; static char rtcp_stats_usage[] = @@ -3380,12 +3362,12 @@ static char rtcp_stats_usage[] = " Enable dumping of RTCP stats.\n"; static char rtcp_no_stats_usage[] = - "Usage: rtcp nostats\n" + "Usage: rtcp stats off\n" " Disable all RTCP stats\n"; static struct ast_cli_entry cli_rtp_no_debug_deprecated = { { "rtp", "no", "debug", NULL }, - rtp_no_debug_deprecated, NULL, + rtp_no_debug, NULL, NULL }; static struct ast_cli_entry cli_rtp_rtcp_debug_ip_deprecated = { @@ -3415,7 +3397,7 @@ static struct ast_cli_entry cli_rtp_rtcp_no_stats_deprecated = { static struct ast_cli_entry cli_stun_no_debug_deprecated = { { "stun", "no", "debug", NULL }, - stun_no_debug_deprecated, NULL, + stun_no_debug, NULL, NULL }; static struct ast_cli_entry cli_rtp[] = { @@ -3427,7 +3409,7 @@ static struct ast_cli_entry cli_rtp[] = { rtp_do_debug, "Enable RTP debugging", debug_usage }, - { { "rtp", "nodebug", NULL }, + { { "rtp", "debug", "off", NULL }, rtp_no_debug, "Disable RTP debugging", no_debug_usage, NULL, &cli_rtp_no_debug_deprecated }, @@ -3439,7 +3421,7 @@ static struct ast_cli_entry cli_rtp[] = { rtcp_do_debug, "Enable RTCP debugging", rtcp_debug_usage, NULL, &cli_rtp_rtcp_debug_deprecated }, - { { "rtcp", "nodebug", NULL }, + { { "rtcp", "debug", "off", NULL }, rtcp_no_debug, "Disable RTCP debugging", rtcp_no_debug_usage, NULL, &cli_rtp_rtcp_no_debug_deprecated }, @@ -3447,7 +3429,7 @@ static struct ast_cli_entry cli_rtp[] = { rtcp_do_stats, "Enable RTCP stats", rtcp_stats_usage, NULL, &cli_rtp_rtcp_stats_deprecated }, - { { "rtcp", "nostats", NULL }, + { { "rtcp", "stats", "off", NULL }, rtcp_no_stats, "Disable RTCP stats", rtcp_no_stats_usage, NULL, &cli_rtp_rtcp_no_stats_deprecated }, @@ -3455,7 +3437,7 @@ static struct ast_cli_entry cli_rtp[] = { stun_do_debug, "Enable STUN debugging", stun_debug_usage }, - { { "stun", "nodebug", NULL }, + { { "stun", "debug", "off", NULL }, stun_no_debug, "Disable STUN debugging", stun_no_debug_usage, NULL, &cli_stun_no_debug_deprecated }, }; |