osmux: allow to specify the Osmux port
via mgcp section from the configuration file.
diff --git a/openbsc/src/libmgcp/osmux.c b/openbsc/src/libmgcp/osmux.c
index c9f344d..a8f5da8 100644
--- a/openbsc/src/libmgcp/osmux.c
+++ b/openbsc/src/libmgcp/osmux.c
@@ -416,7 +416,10 @@
}
osmux_fd.data = cfg;
- ret = mgcp_create_bind("0.0.0.0", &osmux_fd, OSMUX_PORT);
+ if (!cfg->osmux_port)
+ cfg->osmux_port = OSMUX_PORT;
+
+ ret = mgcp_create_bind("0.0.0.0", &osmux_fd, cfg->osmux_port);
if (ret < 0) {
LOGP(DMGCP, LOGL_ERROR, "cannot bind OSMUX socket\n");
return ret;