Merged revisions 47436 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47436 | tilghman | 2006-11-10 10:51:55 -0600 (Fri, 10 Nov 2006) | 2 lines

Discussion of these CLI changes resulted in more consistency (Bug 8236)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2006-11-10 17:01:06 +00:00
parent 0d367b09a5
commit 691363656f
6 changed files with 317 additions and 114 deletions

View File

@@ -2611,17 +2611,17 @@ static int restart_monitor(void)
static int h323_do_trace(int fd, int argc, char *argv[])
{
if (argc != 3) {
if (argc != 4) {
return RESULT_SHOWUSAGE;
}
h323_debug(1, atoi(argv[2]));
h323_debug(1, atoi(argv[3]));
ast_cli(fd, "H.323 trace set to level %s\n", argv[2]);
return RESULT_SUCCESS;
}
static int h323_no_trace(int fd, int argc, char *argv[])
{
if (argc != 3) {
if (argc < 3 || argc > 4) {
return RESULT_SHOWUSAGE;
}
h323_debug(0,0);
@@ -2631,7 +2631,7 @@ static int h323_no_trace(int fd, int argc, char *argv[])
static int h323_do_debug(int fd, int argc, char *argv[])
{
if (argc != 2) {
if (argc < 2 || argc > 3) {
return RESULT_SHOWUSAGE;
}
h323debug = 1;
@@ -2641,7 +2641,7 @@ static int h323_do_debug(int fd, int argc, char *argv[])
static int h323_no_debug(int fd, int argc, char *argv[])
{
if (argc != 3) {
if (argc < 3 || argc > 4) {
return RESULT_SHOWUSAGE;
}
h323debug = 0;
@@ -2725,7 +2725,7 @@ static struct ast_cli_entry cli_h323_trace_deprecated =
trace_usage };
static struct ast_cli_entry cli_h323_no_trace_deprecated =
{ { "h.323", "no", "trace", NULL },
{ "h.323", "no", "trace", NULL },
h323_no_trace, "Disable H.323 Stack Tracing",
no_trace_usage };
};
@@ -2736,7 +2736,7 @@ static struct ast_cli_entry cli_h323_debug_deprecated =
debug_usage };
static struct ast_cli_entry cli_h323_no_debug_deprecated =
{ { "h.323", "no", "debug", NULL },
{ "h.323", "no", "debug", NULL },
h323_no_debug, "Disable H.323 debug",
no_debug_usage };
};
@@ -2756,20 +2756,35 @@ static struct ast_cli_entry cli_h323_show_tokens_deprecated =
h323_tokens_show, "Show all active call tokens",
show_tokens_usage };
static struct ast_cli_entry cli_h323_debug_deprecated = {
{ "h.323", "debug", NULL },
h323_do_debug, "Enable H.323 debug",
debug_usage };
static struct ast_cli_entry cli_h323_trace_deprecated = {
{ "h.323", "trace", NULL },
h323_do_trace, "Enable H.323 Stack Tracing",
trace_usage };
static struct ast_cli_entry cli_h323_gk_cycle_deprecated = {
{ "h323", "cycle", "gk", NULL },
h323_gk_cycle, "Manually re-register with the Gatekeper",
show_cycle_usage };
static struct ast_cli_entry cli_h323[] = {
{ { "h323", "trace", NULL },
{ { "h323", "set", "trace", NULL },
h323_do_trace, "Enable H.323 Stack Tracing",
trace_usage, NULL, &cli_h323_trace_deprecated },
{ { "h323", "trace", "off", NULL },
{ { "h323", "set", "trace", "off", NULL },
h323_no_trace, "Disable H.323 Stack Tracing",
no_trace_usage, NULL, &cli_h323_no_trace_deprecated },
{ { "h323", "debug", NULL },
{ { "h323", "set", "debug", NULL },
h323_do_debug, "Enable H.323 debug",
debug_usage, NULL, &cli_h323_debug_deprecated },
{ { "h323", "debug", "off", NULL },
{ { "h323", "set", "debug", "off", NULL },
h323_no_debug, "Disable H.323 debug",
no_debug_usage, NULL, &cli_h323_no_debug_deprecated },