From 15e7389cf06af3e83d4a5d232d9409fc02002cd0 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 5 Aug 2010 07:10:56 +0800 Subject: mgcp: Prepare to have different port allocation strategies. --- openbsc/src/mgcp/mgcp_protocol.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'openbsc/src/mgcp/mgcp_protocol.c') diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c index 211ec3ea8..ba0ae8d8e 100644 --- a/openbsc/src/mgcp/mgcp_protocol.c +++ b/openbsc/src/mgcp/mgcp_protocol.c @@ -427,10 +427,10 @@ static struct msgb *handle_create_con(struct mgcp_config *cfg, struct msgb *msg) memset(&endp->net_end.addr, 0, sizeof(endp->net_end.addr)); /* bind to the port now */ - port = rtp_calculate_port(ENDPOINT_NUMBER(endp), cfg->rtp_bts_base_port); + port = rtp_calculate_port(ENDPOINT_NUMBER(endp), cfg->bts_ports.base_port); endp->bts_end.local_port = port; - port = rtp_calculate_port(ENDPOINT_NUMBER(endp), cfg->rtp_net_base_port); + port = rtp_calculate_port(ENDPOINT_NUMBER(endp), cfg->net_ports.base_port); endp->net_end.local_port = port; /* assign a local call identifier or fail */ @@ -710,8 +710,9 @@ struct mgcp_config *mgcp_config_alloc(void) cfg->source_addr = talloc_strdup(cfg, "0.0.0.0"); cfg->audio_name = talloc_strdup(cfg, "GSM-EFR/8000"); cfg->audio_payload = 97; - cfg->rtp_bts_base_port = RTP_PORT_DEFAULT; - cfg->rtp_net_base_port = RTP_PORT_NET_DEFAULT; + + cfg->bts_ports.base_port = RTP_PORT_DEFAULT; + cfg->net_ports.base_port = RTP_PORT_NET_DEFAULT; return cfg; } -- cgit v1.2.3