mgcp: Remove dead debug code
ASTERISK-20339 #close Change-Id: I36f364aaa1971241d8f3ea1a5909b463d185a2d5
This commit is contained in:
parent
13fd0789a2
commit
121860e3f6
|
@ -241,8 +241,6 @@ static char ourhost[MAXHOSTNAMELEN];
|
||||||
static struct in_addr __ourip;
|
static struct in_addr __ourip;
|
||||||
static int ourport;
|
static int ourport;
|
||||||
|
|
||||||
static int mgcpdebug = 0;
|
|
||||||
|
|
||||||
static struct ast_sched_context *sched;
|
static struct ast_sched_context *sched;
|
||||||
static struct io_context *io;
|
static struct io_context *io;
|
||||||
/*! The private structures of the mgcp channels are linked for
|
/*! The private structures of the mgcp channels are linked for
|
||||||
|
@ -1072,13 +1070,13 @@ static char *handle_mgcp_audit_endpoint(struct ast_cli_entry *e, int cmd, struct
|
||||||
e->usage =
|
e->usage =
|
||||||
"Usage: mgcp audit endpoint <endpointid>\n"
|
"Usage: mgcp audit endpoint <endpointid>\n"
|
||||||
" Lists the capabilities of an endpoint in the MGCP (Media Gateway Control Protocol) subsystem.\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";
|
" Debug logging (core set debug on) MUST be on to see the results of this command.\n";
|
||||||
return NULL;
|
return NULL;
|
||||||
case CLI_GENERATE:
|
case CLI_GENERATE:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mgcpdebug) {
|
if (!DEBUG_ATLEAST(1)) {
|
||||||
return CLI_SHOWUSAGE;
|
return CLI_SHOWUSAGE;
|
||||||
}
|
}
|
||||||
if (a->argc != 4)
|
if (a->argc != 4)
|
||||||
|
@ -1120,38 +1118,9 @@ static char *handle_mgcp_audit_endpoint(struct ast_cli_entry *e, int cmd, struct
|
||||||
return CLI_SUCCESS;
|
return CLI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *handle_mgcp_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
|
|
||||||
{
|
|
||||||
switch (cmd) {
|
|
||||||
case CLI_INIT:
|
|
||||||
e->command = "mgcp set debug {on|off}";
|
|
||||||
e->usage =
|
|
||||||
"Usage: mgcp set debug {on|off}\n"
|
|
||||||
" Enables/Disables dumping of MGCP packets for debugging purposes\n";
|
|
||||||
return NULL;
|
|
||||||
case CLI_GENERATE:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a->argc != e->args)
|
|
||||||
return CLI_SHOWUSAGE;
|
|
||||||
|
|
||||||
if (!strncasecmp(a->argv[e->args - 1], "on", 2)) {
|
|
||||||
mgcpdebug = 1;
|
|
||||||
ast_cli(a->fd, "MGCP Debugging Enabled\n");
|
|
||||||
} else if (!strncasecmp(a->argv[3], "off", 3)) {
|
|
||||||
mgcpdebug = 0;
|
|
||||||
ast_cli(a->fd, "MGCP Debugging Disabled\n");
|
|
||||||
} else {
|
|
||||||
return CLI_SHOWUSAGE;
|
|
||||||
}
|
|
||||||
return CLI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct ast_cli_entry cli_mgcp[] = {
|
static struct ast_cli_entry cli_mgcp[] = {
|
||||||
AST_CLI_DEFINE(handle_mgcp_audit_endpoint, "Audit specified MGCP endpoint"),
|
AST_CLI_DEFINE(handle_mgcp_audit_endpoint, "Audit specified MGCP endpoint"),
|
||||||
AST_CLI_DEFINE(handle_mgcp_show_endpoints, "List defined MGCP endpoints"),
|
AST_CLI_DEFINE(handle_mgcp_show_endpoints, "List defined MGCP endpoints"),
|
||||||
AST_CLI_DEFINE(handle_mgcp_set_debug, "Enable/Disable MGCP debugging"),
|
|
||||||
AST_CLI_DEFINE(mgcp_reload, "Reload MGCP configuration"),
|
AST_CLI_DEFINE(mgcp_reload, "Reload MGCP configuration"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,6 @@ static uint16_t t1 = 250;
|
||||||
static uint16_t t7 = 200;
|
static uint16_t t7 = 200;
|
||||||
static uint16_t t8 = 300;
|
static uint16_t t8 = 300;
|
||||||
static uint32_t keepalive = 60;
|
static uint32_t keepalive = 60;
|
||||||
static int pktccopsdebug = 0;
|
|
||||||
static int pktcreload = 0;
|
static int pktcreload = 0;
|
||||||
static int gateinfoperiod = 60;
|
static int gateinfoperiod = 60;
|
||||||
static int gatetimeout = 150;
|
static int gatetimeout = 150;
|
||||||
|
@ -639,9 +638,7 @@ static struct cops_gate *cops_gate_cmd(int cmd, struct cops_cmts *cmts,
|
||||||
ast_debug(1, "Construct new gate\n");
|
ast_debug(1, "Construct new gate\n");
|
||||||
cops_construct_gate(cmd, gateset->object->next->next->next->contents, trid, mta, actcount, bitrate, psize, ssip, ssport, 0, cmts);
|
cops_construct_gate(cmd, gateset->object->next->next->next->contents, trid, mta, actcount, bitrate, psize, ssip, ssport, 0, cmts);
|
||||||
}
|
}
|
||||||
if (pktccopsdebug) {
|
ast_debug(3, "send cmd\n");
|
||||||
ast_debug(3, "send cmd\n");
|
|
||||||
}
|
|
||||||
cops_sendmsg(cmts->sfd, gateset);
|
cops_sendmsg(cmts->sfd, gateset);
|
||||||
cops_freemsg(gateset);
|
cops_freemsg(gateset);
|
||||||
ast_free(gateset);
|
ast_free(gateset);
|
||||||
|
@ -1382,41 +1379,12 @@ static char *pktccops_gateset(struct ast_cli_entry *e, int cmd, struct ast_cli_a
|
||||||
return CLI_SUCCESS;
|
return CLI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *pktccops_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
|
|
||||||
{
|
|
||||||
switch (cmd) {
|
|
||||||
case CLI_INIT:
|
|
||||||
e->command = "pktccops set debug {on|off}";
|
|
||||||
e->usage =
|
|
||||||
"Usage: pktccops set debug {on|off}\n"
|
|
||||||
" Turn on/off debuging\n";
|
|
||||||
return NULL;
|
|
||||||
case CLI_GENERATE:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a->argc != e->args)
|
|
||||||
return CLI_SHOWUSAGE;
|
|
||||||
if (!strncasecmp(a->argv[e->args - 1], "on", 2)) {
|
|
||||||
pktccopsdebug = 1;
|
|
||||||
ast_cli(a->fd, "PktcCOPS Debugging Enabled\n");
|
|
||||||
} else if (!strncasecmp(a->argv[e->args - 1], "off", 2)) {
|
|
||||||
pktccopsdebug = 0;
|
|
||||||
ast_cli(a->fd, "PktcCOPS Debugging Disabled\n");
|
|
||||||
} else {
|
|
||||||
return CLI_SHOWUSAGE;
|
|
||||||
}
|
|
||||||
return CLI_SUCCESS;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct ast_cli_entry cli_pktccops[] = {
|
static struct ast_cli_entry cli_pktccops[] = {
|
||||||
AST_CLI_DEFINE(pktccops_show_cmtses, "List PacketCable COPS CMTSes"),
|
AST_CLI_DEFINE(pktccops_show_cmtses, "List PacketCable COPS CMTSes"),
|
||||||
AST_CLI_DEFINE(pktccops_show_gates, "List PacketCable COPS GATEs"),
|
AST_CLI_DEFINE(pktccops_show_gates, "List PacketCable COPS GATEs"),
|
||||||
AST_CLI_DEFINE(pktccops_show_pools, "List PacketCable MTA pools"),
|
AST_CLI_DEFINE(pktccops_show_pools, "List PacketCable MTA pools"),
|
||||||
AST_CLI_DEFINE(pktccops_gateset, "Send Gate-Set to cmts"),
|
AST_CLI_DEFINE(pktccops_gateset, "Send Gate-Set to cmts"),
|
||||||
AST_CLI_DEFINE(pktccops_gatedel, "Send Gate-Det to cmts"),
|
AST_CLI_DEFINE(pktccops_gatedel, "Send Gate-Det to cmts"),
|
||||||
AST_CLI_DEFINE(pktccops_debug, "Enable/Disable COPS debugging")
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int pktccops_add_ippool(struct cops_ippool *ippool)
|
static int pktccops_add_ippool(struct cops_ippool *ippool)
|
||||||
|
|
Loading…
Reference in New Issue