summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-11-02 23:16:09 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-11-02 23:16:09 +0000
commit10875731ecfbe329b31be706d30a81dd579c3b56 (patch)
tree273ac9aad8e573d5fda7e056e0894f20a2d4c7bf /channels/chan_mgcp.c
parent7f7f2fe821f71b302d233081ee0f72e82c9701c2 (diff)
Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments" ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r--channels/chan_mgcp.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index e1eb21e5e..02a7600df 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -1045,11 +1045,11 @@ static int mgcp_show_endpoints(int fd, int argc, char *argv[])
}
static char show_endpoints_usage[] =
-"Usage: mgcp endpoint list\n"
+"Usage: mgcp show endpoints\n"
" Lists all endpoints known to the MGCP (Media Gateway Control Protocol) subsystem.\n";
static char audit_endpoint_usage[] =
-"Usage: mgcp endpoint audit <endpointid>\n"
+"Usage: mgcp audit endpoint <endpointid>\n"
" Lists the capabilities of an endpoint in the MGCP (Media Gateway Control Protocol) subsystem.\n"
" mgcp debug MUST be on to see the results of this command.\n";
@@ -1058,12 +1058,13 @@ static char debug_usage[] =
" Enables dumping of MGCP packets for debugging purposes\n";
static char no_debug_usage[] =
-"Usage: mgcp nodebug\n"
+"Usage: mgcp debug off\n"
" Disables dumping of MGCP packets for debugging purposes\n";
static char mgcp_reload_usage[] =
"Usage: mgcp reload\n"
-" Reloads MGCP configuration from mgcp.conf\n";
+" Reloads MGCP configuration from mgcp.conf\n"
+" Deprecated: please use 'reload chan_mgcp.so' instead.\n";
static int mgcp_audit_endpoint(int fd, int argc, char *argv[])
{
@@ -1129,7 +1130,7 @@ static int mgcp_do_debug(int fd, int argc, char *argv[])
static int mgcp_no_debug(int fd, int argc, char *argv[])
{
- if (argc != 2)
+ if (argc != 3)
return RESULT_SHOWUSAGE;
mgcpdebug = 0;
ast_cli(fd, "MGCP Debugging Disabled\n");
@@ -1137,11 +1138,11 @@ static int mgcp_no_debug(int fd, int argc, char *argv[])
}
static struct ast_cli_entry cli_mgcp[] = {
- { { "mgcp", "endpoint", "audit", NULL },
+ { { "mgcp", "audit", "endpoint", NULL },
mgcp_audit_endpoint, "Audit specified MGCP endpoint",
audit_endpoint_usage },
- { { "mgcp", "endpoint", "list", NULL },
+ { { "mgcp", "show", "endpoints", NULL },
mgcp_show_endpoints, "List defined MGCP endpoints",
show_endpoints_usage },
@@ -1149,7 +1150,7 @@ static struct ast_cli_entry cli_mgcp[] = {
mgcp_do_debug, "Enable MGCP debugging",
debug_usage },
- { { "mgcp", "nodebug", NULL },
+ { { "mgcp", "debug", "off", NULL },
mgcp_no_debug, "Disable MGCP debugging",
no_debug_usage },
@@ -4296,6 +4297,12 @@ static int mgcp_do_reload(void)
static int mgcp_reload(int fd, int argc, char *argv[])
{
+ static int deprecated = 0;
+ if (!deprecated && argc > 0) {
+ ast_log(LOG_WARNING, "'mgcp reload' is deprecated. Please use 'reload chan_mgcp.so' instead.\n");
+ deprecated = 1;
+ }
+
ast_mutex_lock(&mgcp_reload_lock);
if (mgcp_reloading) {
ast_verbose("Previous mgcp reload not yet done\n");