aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/mgcp/mgcp_protocol.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 03:22:24 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 06:10:57 +0800
commitf1a168dc2086bca48d920c45171cb6cbff9211fa (patch)
tree38582f26e99ac29a69862a14335405b0060b9c36 /openbsc/src/mgcp/mgcp_protocol.c
parent58ff219c856a4ad4648e4de06f90907d6964a251 (diff)
mgcp: Only use early bind for the BTS socket.
Simplify the code by onlt allowing one way to allocate a socket.
Diffstat (limited to 'openbsc/src/mgcp/mgcp_protocol.c')
-rw-r--r--openbsc/src/mgcp/mgcp_protocol.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c
index 9bb315a4..8b990221 100644
--- a/openbsc/src/mgcp/mgcp_protocol.c
+++ b/openbsc/src/mgcp/mgcp_protocol.c
@@ -428,11 +428,8 @@ static struct msgb *handle_create_con(struct mgcp_config *cfg, struct msgb *msg)
/* bind to the port now */
port = rtp_calculate_port(ENDPOINT_NUMBER(endp), cfg->rtp_base_port);
- if (cfg->early_bind) {
- endp->bts_end.local_port = port;
- endp->net_end.local_port = port;
- } else if (mgcp_bind_rtp_port(endp, port) != 0)
- goto error2;
+ endp->bts_end.local_port = port;
+ endp->net_end.local_port = port;
/* assign a local call identifier or fail */
endp->ci = generate_call_id(cfg);
@@ -760,11 +757,6 @@ void mgcp_free_endp(struct mgcp_endpoint *endp)
endp->local_options = NULL;
}
- if (!endp->cfg->early_bind) {
- bsc_unregister_fd(&endp->local_rtp);
- bsc_unregister_fd(&endp->local_rtcp);
- }
-
mgcp_rtp_end_reset(&endp->bts_end);
mgcp_rtp_end_reset(&endp->net_end);