mgcp: Begin to separate network and bts endpoints
Make it possible to bind the call-agent to a specific IP address
and the network and bts end to different ip addresses. Begin by
clarifying which source ip address we want to have.
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 40ea791..717c1fc 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -275,7 +275,7 @@
char osmux_extension[strlen("\nX-Osmux: 255") + 1];
if (!addr)
- addr = endp->cfg->source_addr;
+ addr = mgcp_net_src_addr(endp);
if (endp->osmux.state == OSMUX_STATE_ACTIVATING)
sprintf(osmux_extension, "\nX-Osmux: %u", endp->osmux.cid);
@@ -1389,8 +1389,7 @@
if (len < 0)
return;
- nchars = write_response_sdp(endp, buf + len, sizeof(buf) + len - 1,
- endp->cfg->source_addr);
+ nchars = write_response_sdp(endp, buf + len, sizeof(buf) + len - 1, NULL);
if (nchars < 0)
return;