diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 17:01:06 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 17:01:06 +0000 |
commit | 597aa05da580ab8d40c4e2bec66c321ed20803f3 (patch) | |
tree | f383932b2ec9f93ee875d3ca5e4bfca778865778 /channels/chan_h323.c | |
parent | fc1882af792ad211d1f52de1a6ce7e1172ae991f (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@47439 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r-- | channels/chan_h323.c | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index b07400541..06c9b9d3a 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -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 }, |