mgcp: Rename from snmp to hw in variables and function name.
This commit is contained in:
parent
8aaaa406bb
commit
77ffc93742
|
@ -125,7 +125,7 @@ struct mgcp_endpoint {
|
|||
|
||||
/* Special MGW handling */
|
||||
int blocked;
|
||||
unsigned int hw_snmp_port; /** This is index 1 based */
|
||||
unsigned int hw_dsp_port; /** This is index 1 based */
|
||||
unsigned int audio_port;
|
||||
int block_processing;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* mgcp_ss7 helper coder */
|
||||
/*
|
||||
* (C) 2010-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010-2011 by On-Waves
|
||||
* (C) 2010-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010-2012 by On-Waves
|
||||
* All Rights Reserved
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
@ -57,7 +57,7 @@ struct mgcp_ss7_cmd {
|
|||
|
||||
void mgcp_mgw_vty_init();
|
||||
|
||||
int mgcp_snmp_init();
|
||||
int mgcp_snmp_connect(int port, int trunk, int timeslot);
|
||||
int mgcp_hw_init();
|
||||
int mgcp_hw_connect(int port, int trunk, int timeslot);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* (C) 2010-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010-2011 by On-Waves
|
||||
* (C) 2010-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010-2012 by On-Waves
|
||||
* All Rights Reserved
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
@ -23,6 +23,7 @@
|
|||
#include <net-snmp/net-snmp-includes.h>
|
||||
|
||||
#include <cellmgr_debug.h>
|
||||
#include <mgcp_ss7.h>
|
||||
|
||||
#define HSCOMM "PTI-NexusWare-HSCMCONN-MIB::"
|
||||
|
||||
|
@ -72,7 +73,7 @@ static int tx_port_get(int port)
|
|||
return PTMC_STREAM_A_TX0 + port;
|
||||
}
|
||||
|
||||
int mgcp_snmp_init()
|
||||
int mgcp_hw_init()
|
||||
{
|
||||
init_snmp("mgcp_mgw");
|
||||
snmp_sess_init(&g_session);
|
||||
|
@ -92,7 +93,7 @@ int mgcp_snmp_init()
|
|||
return 0;
|
||||
}
|
||||
|
||||
int mgcp_snmp_connect(int port, int trunk, int timeslot)
|
||||
int mgcp_hw_connect(int port, int trunk, int timeslot)
|
||||
{
|
||||
int status;
|
||||
netsnmp_pdu *response = NULL;
|
||||
|
|
|
@ -80,7 +80,7 @@ static int select_voice_port(struct mgcp_endpoint *endp)
|
|||
return -1;
|
||||
}
|
||||
|
||||
mgw_port = endp->hw_snmp_port - 1;
|
||||
mgw_port = endp->hw_dsp_port - 1;
|
||||
fprintf(stderr, "TEST: Going to use MGW: %d for MUL: %d TS: %d\n",
|
||||
mgw_port, multiplex, timeslot);
|
||||
return mgw_port;
|
||||
|
@ -675,13 +675,13 @@ static int configure_trunk(struct mgcp_trunk_config *tcfg, int *dsp_resource)
|
|||
continue;
|
||||
|
||||
*dsp_resource += 1;
|
||||
tcfg->endpoints[i].hw_snmp_port = *dsp_resource;
|
||||
tcfg->endpoints[i].hw_dsp_port = *dsp_resource;
|
||||
|
||||
if (tcfg->cfg->configure_trunks) {
|
||||
int multiplex, timeslot, res;
|
||||
|
||||
mgcp_endpoint_to_timeslot(i, &multiplex, ×lot);
|
||||
res = mgcp_snmp_connect(*dsp_resource,
|
||||
res = mgcp_hw_connect(*dsp_resource,
|
||||
start + multiplex,
|
||||
timeslot);
|
||||
|
||||
|
@ -724,7 +724,7 @@ static struct mgcp_ss7 *mgcp_ss7_init(struct mgcp_config *cfg)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (cfg->configure_trunks && mgcp_snmp_init() != 0) {
|
||||
if (cfg->configure_trunks && mgcp_hw_init() != 0) {
|
||||
LOGP(DMGCP, LOGL_ERROR, "Failed to initialize SNMP.\n");
|
||||
talloc_free(conf);
|
||||
return NULL;
|
||||
|
|
Reference in New Issue