aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/mgcp/mgcp_protocol.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 07:10:56 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 07:10:56 +0800
commit15e7389cf06af3e83d4a5d232d9409fc02002cd0 (patch)
tree8e357703e73b5afc511a413fdbb9f654d36b444a /openbsc/src/mgcp/mgcp_protocol.c
parenta3b46c9ac06adbd16fb0d9a6ae1e31395adca85a (diff)
mgcp: Prepare to have different port allocation strategies.
Diffstat (limited to 'openbsc/src/mgcp/mgcp_protocol.c')
-rw-r--r--openbsc/src/mgcp/mgcp_protocol.c9
1 files changed, 5 insertions, 4 deletions
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;
}