osmux: Clean up mgcp_config osmux fields
* Move all of them to an anonymous "osmux" substruct to have them all
together.
* Rename some fields to clarify its meanings, similar to what
was already done in osmo-bts.
* Move the port VTY config next to the ip address ones.
Change-Id: Icc1c1ce3ab3a8beb941cda7c112485a0db882a90
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 781bb44..3981975 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -102,19 +102,19 @@
if (rem_addr_set) {
/* Match IP version with what was requested from remote: */
bind_addr = conn->end.addr.u.sa.sa_family == AF_INET6 ?
- cfg->osmux_addr_v6 :
- cfg->osmux_addr_v4;
+ cfg->osmux.local_addr_v6 :
+ cfg->osmux.local_addr_v4;
} else {
/* Choose any of the bind addresses, preferring v6 over v4 if available: */
- bind_addr = cfg->osmux_addr_v6;
+ bind_addr = cfg->osmux.local_addr_v6;
if (!bind_addr)
- bind_addr = cfg->osmux_addr_v4;
+ bind_addr = cfg->osmux.local_addr_v4;
}
if (!bind_addr) {
LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR,
"Unable to locate local Osmux address, check your configuration! v4=%u v6=%u remote_known=%s\n",
- !!cfg->osmux_addr_v4,
- !!cfg->osmux_addr_v6,
+ !!cfg->osmux.local_addr_v4,
+ !!cfg->osmux.local_addr_v6,
rem_addr_set ? osmo_sockaddr_ntop(&conn->end.addr.u.sa, ipbuf) : "no");
return -1;
}