diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 16:51:55 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 16:51:55 +0000 |
commit | 24b76f7acb42526b281446b6439a7a26da892771 (patch) | |
tree | 7e3c19818310f61a5fa8252c11aa4d83349d42f1 /channels/chan_h323.c | |
parent | 81e083c12a277ee3fdc6aecb5b84a921c14370ac (diff) |
Discussion of these CLI changes resulted in more consistency (Bug 8236)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47436 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r-- | channels/chan_h323.c | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index b8a9ad9e6..478644be7 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -2533,17 +2533,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); @@ -2553,7 +2553,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; @@ -2563,7 +2563,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; @@ -2642,43 +2642,58 @@ static char h323_reload_usage[] = " Reloads H.323 configuration from h323.conf\n"; 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 }; }; 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 }; }; +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[] = { - { { "h.323", "trace", NULL }, + { { "h323", "set", "trace", NULL }, h323_do_trace, "Enable H.323 Stack Tracing", - trace_usage }, + trace_usage, NULL, cli_h323_trace_deprecated }, - { { "h.323", "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 }, - { { "h.323", "debug", NULL }, + { { "h323", "set", "debug", NULL }, h323_do_debug, "Enable H.323 debug", - debug_usage }, + debug_usage, NULL, cli_h323_debug_deprecated }, - { { "h.323", "debug", "off", NULL }, + { { "h323", "set", "debug", "off", NULL }, h323_no_debug, "Disable H.323 debug", no_debug_usage, NULL, cli_h323_no_debug_deprecated }, - { { "h.323", "gk", "cycle", NULL }, + { { "h323", "cycle", "gk", NULL }, h323_gk_cycle, "Manually re-register with the Gatekeper", - show_cycle_usage }, + show_cycle_usage, NULL, cli_h323_gk_cycle_deprecated }, - { { "h.323", "hangup", NULL }, + { { "h323", "hangup", NULL }, h323_ep_hangup, "Manually try to hang up a call", show_hangup_usage }, - { { "h.323", "show", "tokens", NULL }, + { { "h323", "show", "tokens", NULL }, h323_tokens_show, "Show all active call tokens", show_tokens_usage }, }; |