aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/osmux.h2
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c5
-rw-r--r--openbsc/src/libmgcp/mgcp_vty.c1
3 files changed, 3 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/osmux.h b/openbsc/include/openbsc/osmux.h
index f4cb17abd..8c01fd00b 100644
--- a/openbsc/include/openbsc/osmux.h
+++ b/openbsc/include/openbsc/osmux.h
@@ -3,6 +3,8 @@
#include <osmocom/netif/osmux.h>
+#define OSMUX_PORT 1984
+
enum {
OSMUX_ROLE_BSC = 0,
OSMUX_ROLE_BSC_NAT,
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index ee794310e..7c0b41c83 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -24,8 +24,6 @@
#include <openbsc/mgcp_internal.h>
#include <openbsc/osmux.h>
-#define OSMUX_PORT 1984
-
static struct osmo_fd osmux_fd;
static LLIST_HEAD(osmux_handle_list);
@@ -395,9 +393,6 @@ int osmux_init(int role, struct mgcp_config *cfg)
}
osmux_fd.data = cfg;
- 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");
diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index abb54d417..d40a3ce27 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -1294,6 +1294,7 @@ int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg,
int rc;
struct mgcp_trunk_config *trunk;
+ cfg->osmux_port = OSMUX_PORT;
/* Default to 4 messages */
cfg->osmux_batch = 4;