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

@@ -4449,7 +4449,7 @@ static int iax2_show_netstats(int fd, int argc, char *argv[])
static int iax2_do_debug(int fd, int argc, char *argv[])
{
if (argc != 2)
if (argc < 2 || argc > 3)
return RESULT_SHOWUSAGE;
iaxdebug = 1;
ast_cli(fd, "IAX2 Debugging Enabled\n");
@@ -4458,7 +4458,7 @@ static int iax2_do_debug(int fd, int argc, char *argv[])
static int iax2_do_trunk_debug(int fd, int argc, char *argv[])
{
if (argc != 3)
if (argc < 3 || argc > 4)
return RESULT_SHOWUSAGE;
iaxtrunkdebug = 1;
ast_cli(fd, "IAX2 Trunk Debug Requested\n");
@@ -4467,7 +4467,7 @@ static int iax2_do_trunk_debug(int fd, int argc, char *argv[])
static int iax2_do_jb_debug(int fd, int argc, char *argv[])
{
if (argc != 3)
if (argc < 3 || argc > 4)
return RESULT_SHOWUSAGE;
jb_setoutput(jb_error_output, jb_warning_output, jb_debug_output);
ast_cli(fd, "IAX2 Jitterbuffer Debugging Enabled\n");
@@ -4476,7 +4476,7 @@ static int iax2_do_jb_debug(int fd, int argc, char *argv[])
static int iax2_no_debug(int fd, int argc, char *argv[])
{
if (argc != 3)
if (argc < 3 || argc > 4)
return RESULT_SHOWUSAGE;
iaxdebug = 0;
ast_cli(fd, "IAX2 Debugging Disabled\n");
@@ -4485,7 +4485,7 @@ static int iax2_no_debug(int fd, int argc, char *argv[])
static int iax2_no_trunk_debug(int fd, int argc, char *argv[])
{
if (argc != 4)
if (argc < 4 || argc > 5)
return RESULT_SHOWUSAGE;
iaxtrunkdebug = 0;
ast_cli(fd, "IAX2 Trunk Debugging Disabled\n");
@@ -4494,7 +4494,7 @@ static int iax2_no_trunk_debug(int fd, int argc, char *argv[])
static int iax2_no_jb_debug(int fd, int argc, char *argv[])
{
if (argc != 4)
if (argc < 4 || argc > 5)
return RESULT_SHOWUSAGE;
iaxtrunkdebug = 0;
ast_cli(fd, "IAX2 Trunk Debugging Disabled\n");
@@ -9699,27 +9699,27 @@ static char show_reg_usage[] =
" Lists all registration requests and status.\n";
static char debug_usage[] =
"Usage: iax2 debug\n"
"Usage: iax2 set debug\n"
" Enables dumping of IAX packets for debugging purposes\n";
static char no_debug_usage[] =
"Usage: iax2 nodebug\n"
"Usage: iax2 set debug off\n"
" Disables dumping of IAX packets for debugging purposes\n";
static char debug_trunk_usage[] =
"Usage: iax2 debug trunk\n"
"Usage: iax2 set debug trunk\n"
" Requests current status of IAX trunking\n";
static char no_debug_trunk_usage[] =
"Usage: iax2 nodebug trunk\n"
"Usage: iax2 set debug trunk off\n"
" Requests current status of IAX trunking\n";
static char debug_jb_usage[] =
"Usage: iax2 debug jb\n"
"Usage: iax2 set debug jb\n"
" Enables jitterbuffer debugging information\n";
static char no_debug_jb_usage[] =
"Usage: iax2 nodebug jb\n"
"Usage: iax2 set debug jb off\n"
" Disables jitterbuffer debugging information\n";
static char iax2_test_losspct_usage[] =
@@ -9793,27 +9793,27 @@ static struct ast_cli_entry cli_iax2[] = {
iax2_show_peer, "Show details on specific IAX peer",
show_peer_usage, complete_iax2_show_peer },
{ { "iax2", "debug", NULL },
{ { "iax2", "set", "debug", NULL },
iax2_do_debug, "Enable IAX debugging",
debug_usage },
{ { "iax2", "debug", "trunk", NULL },
{ { "iax2", "set", "debug", "trunk", NULL },
iax2_do_trunk_debug, "Enable IAX trunk debugging",
debug_trunk_usage },
{ { "iax2", "debug", "jb", NULL },
{ { "iax2", "set", "debug", "jb", NULL },
iax2_do_jb_debug, "Enable IAX jitterbuffer debugging",
debug_jb_usage },
{ { "iax2", "debug", "off", NULL },
{ { "iax2", "set", "debug", "off", NULL },
iax2_no_debug, "Disable IAX debugging",
no_debug_usage },
{ { "iax2", "debug", "trunk", "off", NULL },
{ { "iax2", "set", "debug", "trunk", "off", NULL },
iax2_no_trunk_debug, "Disable IAX trunk debugging",
no_debug_trunk_usage },
{ { "iax2", "debug", "jb", "off", NULL },
{ { "iax2", "set", "debug", "jb", "off", NULL },
iax2_no_jb_debug, "Disable IAX jitterbuffer debugging",
no_debug_jb_usage },