aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-10-12 09:37:35 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-10-12 09:37:35 +0200
commitf3316e30d61603d55ed43906aaacb28e970989dc (patch)
tree78d97f9540eb50e1abc5c4bfb025963bc5a652c7
parentd74cce266bbc6ec519376601a2004f4fa8155b64 (diff)
mgcp: Use the right bind addresses for NET and BTSopenbsc/0.15.0
This API is a bit unfortunate as the caller will also access the endpoint directly. E.g. like this: output = bsc_mgcp_rewrite(..., mgcp_net_src_addr(endp), endp->net_end.local_port, -1, In terms of "terminology" the "net" was meant to be bad internet and the "bts" is the local and trusted network segment. With this terminology the "bts" would be the call-agent/MGW and "net" where the BSCs will send data to but that is not the case and terminology actuallys refers to: * net: The addresses exposed to the entity that made the MGCP call * bts: The system where we get our data for the local audio flow. Fix the method but leave the API as it is. Use the net_end in the net_src method and the bts_end in the bts_src method.
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index db22bcfda..7c89d1021 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -329,14 +329,14 @@ int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec,
*/
static inline const char *mgcp_net_src_addr(struct mgcp_endpoint *endp)
{
- if (endp->cfg->bts_ports.bind_addr)
- return endp->cfg->bts_ports.bind_addr;
+ if (endp->cfg->net_ports.bind_addr)
+ return endp->cfg->net_ports.bind_addr;
return endp->cfg->source_addr;
}
static inline const char *mgcp_bts_src_addr(struct mgcp_endpoint *endp)
{
- if (endp->cfg->net_ports.bind_addr)
- return endp->cfg->net_ports.bind_addr;
+ if (endp->cfg->bts_ports.bind_addr)
+ return endp->cfg->bts_ports.bind_addr;
return endp->cfg->source_addr;
}