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_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index f3ebe60..77c99f3 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -745,7 +745,7 @@
*/
static int mgcp_osmux_setup(struct mgcp_endpoint *endp, const char *line)
{
- if (!endp->trunk->cfg->osmux_initialized) {
+ if (!endp->trunk->cfg->osmux.initialized) {
if (osmux_init(endp->trunk) < 0) {
LOGPENDP(endp, DOSMUX, LOGL_ERROR, "Cannot init OSMUX\n");
return -3;
@@ -898,7 +898,7 @@
case 'X':
if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) {
/* If osmux is disabled, just skip setting it up */
- if (rq->endp->trunk->cfg->osmux_use == OSMUX_USAGE_OFF)
+ if (rq->endp->trunk->cfg->osmux.usage == OSMUX_USAGE_OFF)
break;
remote_osmux_cid = mgcp_osmux_setup(endp, line);
break;
@@ -1013,7 +1013,7 @@
conn->osmux.remote_cid_present = true;
conn->osmux.remote_cid = remote_osmux_cid;
}
- } else if (endp->trunk->cfg->osmux_use == OSMUX_USAGE_ONLY) {
+ } else if (endp->trunk->cfg->osmux.usage == OSMUX_USAGE_ONLY) {
LOGPCONN(_conn, DLMGCP, LOGL_ERROR,
"CRCX: osmux only and no osmux offered\n");
rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_CRCX_FAIL_NO_OSMUX));
@@ -1190,7 +1190,7 @@
case 'X':
if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) {
/* If osmux is disabled, just skip setting it up */
- if (endp->trunk->cfg->osmux_use == OSMUX_USAGE_OFF)
+ if (endp->trunk->cfg->osmux.usage == OSMUX_USAGE_OFF)
break;
remote_osmux_cid = mgcp_osmux_setup(endp, line);
break;