mgcp: Rename the bind method to show it is only binding for the bts port
This commit is contained in:
parent
f1a168dc20
commit
217d712012
|
@ -111,7 +111,7 @@ struct mgcp_config *mgcp_config_alloc(void);
|
|||
int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg);
|
||||
int mgcp_vty_init(void);
|
||||
int mgcp_endpoints_allocate(struct mgcp_config *cfg);
|
||||
int mgcp_bind_rtp_port(struct mgcp_endpoint *endp, int rtp_port);
|
||||
int mgcp_bind_bts_rtp_port(struct mgcp_endpoint *endp, int rtp_port);
|
||||
void mgcp_free_endp(struct mgcp_endpoint *endp);
|
||||
|
||||
/*
|
||||
|
|
|
@ -337,9 +337,8 @@ cleanup0:
|
|||
return -1;
|
||||
}
|
||||
|
||||
int mgcp_bind_rtp_port(struct mgcp_endpoint *endp, int rtp_port)
|
||||
int mgcp_bind_bts_rtp_port(struct mgcp_endpoint *endp, int rtp_port)
|
||||
{
|
||||
endp->bts_end.local_port = rtp_port;
|
||||
endp->net_end.local_port = rtp_port;
|
||||
return bind_rtp(endp);
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg)
|
|||
int rtp_port;
|
||||
|
||||
rtp_port = rtp_calculate_port(ENDPOINT_NUMBER(endp), g_cfg->rtp_base_port);
|
||||
if (mgcp_bind_rtp_port(endp, rtp_port) != 0) {
|
||||
if (mgcp_bind_bts_rtp_port(endp, rtp_port) != 0) {
|
||||
LOGP(DMGCP, LOGL_FATAL, "Failed to bind: %d\n", rtp_port);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue