osmux: set default port from mgcp_parse_config()

This commit is contained in:
Pablo Neira Ayuso 2014-08-29 12:20:17 +02:00
parent 73ec6980d5
commit 308d5f8912
3 changed files with 3 additions and 5 deletions

View File

@ -3,6 +3,8 @@
#include <osmocom/netif/osmux.h>
#define OSMUX_PORT 1984
enum {
OSMUX_ROLE_BSC = 0,
OSMUX_ROLE_BSC_NAT,

View File

@ -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");

View File

@ -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;