mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
More changes making the CLI more consistent with "category verb arguments" (continuation of issue 8236)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4390,11 +4390,6 @@ static char qam_cmd_usage[] =
|
|||||||
static char qrm_cmd_usage[] =
|
static char qrm_cmd_usage[] =
|
||||||
"Usage: queue remove member <channel> from <queue>\n";
|
"Usage: queue remove member <channel> from <queue>\n";
|
||||||
|
|
||||||
static struct ast_cli_entry cli_show_queues_deprecated = {
|
|
||||||
{ "show", "queues", NULL },
|
|
||||||
queue_show, NULL,
|
|
||||||
NULL, NULL };
|
|
||||||
|
|
||||||
static struct ast_cli_entry cli_show_queue_deprecated = {
|
static struct ast_cli_entry cli_show_queue_deprecated = {
|
||||||
{ "show", "queue", NULL },
|
{ "show", "queue", NULL },
|
||||||
queue_show, NULL,
|
queue_show, NULL,
|
||||||
@@ -4411,6 +4406,11 @@ static struct ast_cli_entry cli_remove_queue_member_deprecated = {
|
|||||||
NULL, complete_queue_remove_member };
|
NULL, complete_queue_remove_member };
|
||||||
|
|
||||||
static struct ast_cli_entry cli_queue[] = {
|
static struct ast_cli_entry cli_queue[] = {
|
||||||
|
/* Deprecated */
|
||||||
|
{ { "show", "queues", NULL },
|
||||||
|
queue_show, NULL,
|
||||||
|
NULL, NULL },
|
||||||
|
|
||||||
{ { "queue", "show", NULL },
|
{ { "queue", "show", NULL },
|
||||||
queue_show, "Show status of a specified queue",
|
queue_show, "Show status of a specified queue",
|
||||||
queue_show_usage, complete_queue, &cli_show_queue_deprecated },
|
queue_show_usage, complete_queue, &cli_show_queue_deprecated },
|
||||||
|
@@ -2612,7 +2612,7 @@ static char trace_usage[] =
|
|||||||
" Enables H.323 stack tracing for debugging purposes\n";
|
" Enables H.323 stack tracing for debugging purposes\n";
|
||||||
|
|
||||||
static char no_trace_usage[] =
|
static char no_trace_usage[] =
|
||||||
"Usage: h.323 no trace\n"
|
"Usage: h.323 trace off\n"
|
||||||
" Disables H.323 stack tracing for debugging purposes\n";
|
" Disables H.323 stack tracing for debugging purposes\n";
|
||||||
|
|
||||||
static char debug_usage[] =
|
static char debug_usage[] =
|
||||||
@@ -2620,7 +2620,7 @@ static char debug_usage[] =
|
|||||||
" Enables H.323 debug output\n";
|
" Enables H.323 debug output\n";
|
||||||
|
|
||||||
static char no_debug_usage[] =
|
static char no_debug_usage[] =
|
||||||
"Usage: h.323 no debug\n"
|
"Usage: h.323 debug off\n"
|
||||||
" Disables H.323 debug output\n";
|
" Disables H.323 debug output\n";
|
||||||
|
|
||||||
static char show_cycle_usage[] =
|
static char show_cycle_usage[] =
|
||||||
@@ -2639,22 +2639,32 @@ static char h323_reload_usage[] =
|
|||||||
"Usage: h323 reload\n"
|
"Usage: h323 reload\n"
|
||||||
" Reloads H.323 configuration from h323.conf\n";
|
" Reloads H.323 configuration from h323.conf\n";
|
||||||
|
|
||||||
|
static struct ast_cli_entry cli_h323_no_trace_deprecated = {
|
||||||
|
{ { "h.323", "no", "trace", NULL },
|
||||||
|
h323_no_trace, "Disable H.323 Stack Tracing",
|
||||||
|
no_trace_usage };
|
||||||
|
|
||||||
|
static struct ast_cli_entry cli_h323_no_debug_deprecated = {
|
||||||
|
{ { "h.323", "no", "debug", NULL },
|
||||||
|
h323_no_debug, "Disable H.323 debug",
|
||||||
|
no_debug_usage };
|
||||||
|
|
||||||
static struct ast_cli_entry cli_h323[] = {
|
static struct ast_cli_entry cli_h323[] = {
|
||||||
{ { "h.323", "trace", NULL },
|
{ { "h.323", "trace", NULL },
|
||||||
h323_do_trace, "Enable H.323 Stack Tracing",
|
h323_do_trace, "Enable H.323 Stack Tracing",
|
||||||
trace_usage },
|
trace_usage },
|
||||||
|
|
||||||
{ { "h.323", "no", "trace", NULL },
|
{ { "h.323", "trace", "off", NULL },
|
||||||
h323_no_trace, "Disable H.323 Stack Tracing",
|
h323_no_trace, "Disable H.323 Stack Tracing",
|
||||||
no_trace_usage },
|
no_trace_usage, NULL, cli_h323_no_trace_deprecated },
|
||||||
|
|
||||||
{ { "h.323", "debug", NULL },
|
{ { "h.323", "debug", NULL },
|
||||||
h323_do_debug, "Enable H.323 debug",
|
h323_do_debug, "Enable H.323 debug",
|
||||||
debug_usage },
|
debug_usage },
|
||||||
|
|
||||||
{ { "h.323", "no", "debug", NULL },
|
{ { "h.323", "debug", "off", NULL },
|
||||||
h323_no_debug, "Disable H.323 debug",
|
h323_no_debug, "Disable H.323 debug",
|
||||||
no_debug_usage },
|
no_debug_usage, NULL, cli_h323_no_debug_deprecated },
|
||||||
|
|
||||||
{ { "h.323", "gk", "cycle", NULL },
|
{ { "h.323", "gk", "cycle", NULL },
|
||||||
h323_gk_cycle, "Manually re-register with the Gatekeper",
|
h323_gk_cycle, "Manually re-register with the Gatekeper",
|
||||||
|
@@ -1981,7 +1981,7 @@ static struct ast_cli_entry cli_skinny[] = {
|
|||||||
skinny_do_debug, "Enable Skinny debugging",
|
skinny_do_debug, "Enable Skinny debugging",
|
||||||
debug_usage },
|
debug_usage },
|
||||||
|
|
||||||
{ { "skinny", "no", "debug", NULL },
|
{ { "skinny", "debug", "off", NULL },
|
||||||
skinny_no_debug, "Disable Skinny debugging",
|
skinny_no_debug, "Disable Skinny debugging",
|
||||||
no_debug_usage },
|
no_debug_usage },
|
||||||
|
|
||||||
|
48
main/rtp.c
48
main/rtp.c
@@ -3269,18 +3269,9 @@ static int rtcp_do_stats(int fd, int argc, char *argv[]) {
|
|||||||
return RESULT_SUCCESS;
|
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[])
|
static int rtp_no_debug(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc != 2)
|
if (argc != 3)
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
rtpdebug = 0;
|
rtpdebug = 0;
|
||||||
ast_cli(fd,"RTP Debugging Disabled\n");
|
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[])
|
static int rtcp_no_debug(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc != 2)
|
if (argc != 3)
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
rtcpdebug = 0;
|
rtcpdebug = 0;
|
||||||
ast_cli(fd,"RTCP Debugging Disabled\n");
|
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[])
|
static int rtcp_no_stats(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc != 2)
|
if (argc != 3)
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
rtcpstats = 0;
|
rtcpstats = 0;
|
||||||
ast_cli(fd,"RTCP Stats Disabled\n");
|
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;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stun_no_debug_deprecated(int fd, int argc, char *argv[])
|
static int stun_no_debug(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc != 3)
|
if (argc != 3)
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
stundebug = 0;
|
stundebug = 0;
|
||||||
ast_cli(fd,"STUN Debugging Disabled\n");
|
ast_cli(fd, "STUN Debugging Disabled\n");
|
||||||
return RESULT_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int stun_no_debug(int fd, int argc, char *argv[])
|
|
||||||
{
|
|
||||||
if (argc != 2)
|
|
||||||
return RESULT_SHOWUSAGE;
|
|
||||||
stundebug = 0;
|
|
||||||
ast_cli(fd,"STUN Debugging Disabled\n");
|
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3356,7 +3338,7 @@ static char debug_usage[] =
|
|||||||
" Enable dumping of all RTP packets to and from host.\n";
|
" Enable dumping of all RTP packets to and from host.\n";
|
||||||
|
|
||||||
static char no_debug_usage[] =
|
static char no_debug_usage[] =
|
||||||
"Usage: rtp nodebug\n"
|
"Usage: rtp debug off\n"
|
||||||
" Disable all RTP debugging\n";
|
" Disable all RTP debugging\n";
|
||||||
|
|
||||||
static char stun_debug_usage[] =
|
static char stun_debug_usage[] =
|
||||||
@@ -3364,7 +3346,7 @@ static char stun_debug_usage[] =
|
|||||||
" Enable STUN (Simple Traversal of UDP through NATs) debugging\n";
|
" Enable STUN (Simple Traversal of UDP through NATs) debugging\n";
|
||||||
|
|
||||||
static char stun_no_debug_usage[] =
|
static char stun_no_debug_usage[] =
|
||||||
"Usage: stun nodebug\n"
|
"Usage: stun debug off\n"
|
||||||
" Disable STUN debugging\n";
|
" Disable STUN debugging\n";
|
||||||
|
|
||||||
static char rtcp_debug_usage[] =
|
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";
|
" Enable dumping of all RTCP packets to and from host.\n";
|
||||||
|
|
||||||
static char rtcp_no_debug_usage[] =
|
static char rtcp_no_debug_usage[] =
|
||||||
"Usage: rtcp nodebug\n"
|
"Usage: rtcp debug off\n"
|
||||||
" Disable all RTCP debugging\n";
|
" Disable all RTCP debugging\n";
|
||||||
|
|
||||||
static char rtcp_stats_usage[] =
|
static char rtcp_stats_usage[] =
|
||||||
@@ -3380,12 +3362,12 @@ static char rtcp_stats_usage[] =
|
|||||||
" Enable dumping of RTCP stats.\n";
|
" Enable dumping of RTCP stats.\n";
|
||||||
|
|
||||||
static char rtcp_no_stats_usage[] =
|
static char rtcp_no_stats_usage[] =
|
||||||
"Usage: rtcp nostats\n"
|
"Usage: rtcp stats off\n"
|
||||||
" Disable all RTCP stats\n";
|
" Disable all RTCP stats\n";
|
||||||
|
|
||||||
static struct ast_cli_entry cli_rtp_no_debug_deprecated = {
|
static struct ast_cli_entry cli_rtp_no_debug_deprecated = {
|
||||||
{ "rtp", "no", "debug", NULL },
|
{ "rtp", "no", "debug", NULL },
|
||||||
rtp_no_debug_deprecated, NULL,
|
rtp_no_debug, NULL,
|
||||||
NULL };
|
NULL };
|
||||||
|
|
||||||
static struct ast_cli_entry cli_rtp_rtcp_debug_ip_deprecated = {
|
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 = {
|
static struct ast_cli_entry cli_stun_no_debug_deprecated = {
|
||||||
{ "stun", "no", "debug", NULL },
|
{ "stun", "no", "debug", NULL },
|
||||||
stun_no_debug_deprecated, NULL,
|
stun_no_debug, NULL,
|
||||||
NULL };
|
NULL };
|
||||||
|
|
||||||
static struct ast_cli_entry cli_rtp[] = {
|
static struct ast_cli_entry cli_rtp[] = {
|
||||||
@@ -3427,7 +3409,7 @@ static struct ast_cli_entry cli_rtp[] = {
|
|||||||
rtp_do_debug, "Enable RTP debugging",
|
rtp_do_debug, "Enable RTP debugging",
|
||||||
debug_usage },
|
debug_usage },
|
||||||
|
|
||||||
{ { "rtp", "nodebug", NULL },
|
{ { "rtp", "debug", "off", NULL },
|
||||||
rtp_no_debug, "Disable RTP debugging",
|
rtp_no_debug, "Disable RTP debugging",
|
||||||
no_debug_usage, NULL, &cli_rtp_no_debug_deprecated },
|
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_do_debug, "Enable RTCP debugging",
|
||||||
rtcp_debug_usage, NULL, &cli_rtp_rtcp_debug_deprecated },
|
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, "Disable RTCP debugging",
|
||||||
rtcp_no_debug_usage, NULL, &cli_rtp_rtcp_no_debug_deprecated },
|
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_do_stats, "Enable RTCP stats",
|
||||||
rtcp_stats_usage, NULL, &cli_rtp_rtcp_stats_deprecated },
|
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, "Disable RTCP stats",
|
||||||
rtcp_no_stats_usage, NULL, &cli_rtp_rtcp_no_stats_deprecated },
|
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_do_debug, "Enable STUN debugging",
|
||||||
stun_debug_usage },
|
stun_debug_usage },
|
||||||
|
|
||||||
{ { "stun", "nodebug", NULL },
|
{ { "stun", "debug", "off", NULL },
|
||||||
stun_no_debug, "Disable STUN debugging",
|
stun_no_debug, "Disable STUN debugging",
|
||||||
stun_no_debug_usage, NULL, &cli_stun_no_debug_deprecated },
|
stun_no_debug_usage, NULL, &cli_stun_no_debug_deprecated },
|
||||||
};
|
};
|
||||||
|
17
main/udptl.c
17
main/udptl.c
@@ -1135,18 +1135,9 @@ static int udptl_do_debug(int fd, int argc, char *argv[])
|
|||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int udptl_nodebug_deprecated(int fd, int argc, char *argv[])
|
|
||||||
{
|
|
||||||
if (argc !=3)
|
|
||||||
return RESULT_SHOWUSAGE;
|
|
||||||
udptldebug = 0;
|
|
||||||
ast_cli(fd,"UDPTL Debugging Disabled\n");
|
|
||||||
return RESULT_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int udptl_nodebug(int fd, int argc, char *argv[])
|
static int udptl_nodebug(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc != 2)
|
if (argc != 3)
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
udptldebug = 0;
|
udptldebug = 0;
|
||||||
ast_cli(fd,"UDPTL Debugging Disabled\n");
|
ast_cli(fd,"UDPTL Debugging Disabled\n");
|
||||||
@@ -1158,12 +1149,12 @@ static char debug_usage[] =
|
|||||||
" Enable dumping of all UDPTL packets to and from host.\n";
|
" Enable dumping of all UDPTL packets to and from host.\n";
|
||||||
|
|
||||||
static char nodebug_usage[] =
|
static char nodebug_usage[] =
|
||||||
"Usage: udptl nodebug\n"
|
"Usage: udptl debug off\n"
|
||||||
" Disable all UDPTL debugging\n";
|
" Disable all UDPTL debugging\n";
|
||||||
|
|
||||||
static struct ast_cli_entry cli_udptl_no_debug = {
|
static struct ast_cli_entry cli_udptl_no_debug = {
|
||||||
{ "udptl", "no", "debug", NULL },
|
{ "udptl", "no", "debug", NULL },
|
||||||
udptl_nodebug_deprecated, NULL,
|
udptl_nodebug, NULL,
|
||||||
NULL };
|
NULL };
|
||||||
|
|
||||||
static struct ast_cli_entry cli_udptl[] = {
|
static struct ast_cli_entry cli_udptl[] = {
|
||||||
@@ -1175,7 +1166,7 @@ static struct ast_cli_entry cli_udptl[] = {
|
|||||||
udptl_do_debug, "Enable UDPTL debugging on IP",
|
udptl_do_debug, "Enable UDPTL debugging on IP",
|
||||||
debug_usage },
|
debug_usage },
|
||||||
|
|
||||||
{ { "udptl", "nodebug", NULL },
|
{ { "udptl", "debug", "off", NULL },
|
||||||
udptl_nodebug, "Disable UDPTL debugging",
|
udptl_nodebug, "Disable UDPTL debugging",
|
||||||
nodebug_usage, NULL, &cli_udptl_no_debug },
|
nodebug_usage, NULL, &cli_udptl_no_debug },
|
||||||
};
|
};
|
||||||
|
@@ -2114,7 +2114,7 @@ static struct ast_cli_entry cli_agi[] = {
|
|||||||
agi_do_debug, "Enable AGI debugging",
|
agi_do_debug, "Enable AGI debugging",
|
||||||
debug_usage },
|
debug_usage },
|
||||||
|
|
||||||
{ { "agi", "nodebug", NULL },
|
{ { "agi", "debug", "off", NULL },
|
||||||
agi_no_debug, "Disable AGI debugging",
|
agi_no_debug, "Disable AGI debugging",
|
||||||
no_debug_usage, NULL, &cli_agi_no_debug_deprecated },
|
no_debug_usage, NULL, &cli_agi_no_debug_deprecated },
|
||||||
|
|
||||||
|
@@ -103,7 +103,7 @@ static char debug_usage[] =
|
|||||||
" Enables dumping of Jabber packets for debugging purposes.\n";
|
" Enables dumping of Jabber packets for debugging purposes.\n";
|
||||||
|
|
||||||
static char no_debug_usage[] =
|
static char no_debug_usage[] =
|
||||||
"Usage: jabber no debug\n"
|
"Usage: jabber debug off\n"
|
||||||
" Disables dumping of Jabber packets for debugging purposes.\n";
|
" Disables dumping of Jabber packets for debugging purposes.\n";
|
||||||
|
|
||||||
static char reload_usage[] =
|
static char reload_usage[] =
|
||||||
@@ -128,7 +128,7 @@ static struct ast_cli_entry aji_cli[] = {
|
|||||||
aji_show_clients, "Show state of clients and components",
|
aji_show_clients, "Show state of clients and components",
|
||||||
debug_usage },
|
debug_usage },
|
||||||
|
|
||||||
{ { "jabber", "no", "debug", NULL},
|
{ { "jabber", "debug", "off", NULL},
|
||||||
aji_no_debug, "Disable Jabber debug",
|
aji_no_debug, "Disable Jabber debug",
|
||||||
no_debug_usage },
|
no_debug_usage },
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user