diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-01-20 23:34:43 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-02-15 14:27:52 +0100 |
commit | a9a7120c82f571554e6c1417eec0803f15e6c7bb (patch) | |
tree | fcfd92dd0f13f9edacc7ff8a22f45bbe264213d9 /src/common/main.c | |
parent | 5dfb115eaf16a5c5e9ccea5b03374651aa97da11 (diff) |
make PCU socket and telnet port configurable
In some cases we'd like to run multiple instances of osmo-bts on a
single machine. This is the case where we a multi-TRX PHY is to be used
for several BTSs, or in case osmo-bts-trx has multple SDRs attached.
This wa currently prevented by having a hard-coded PCU socket path
and telnet port, which are now configurable via VTY / config file
itself.
Diffstat (limited to 'src/common/main.c')
-rw-r--r-- | src/common/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/main.c b/src/common/main.c index e454a28b..d19c2840 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -1,6 +1,6 @@ /* Main program for Osmocom BTS */ -/* (C) 2011-2015 by Harald Welte <laforge@gnumonks.org> +/* (C) 2011-2016 by Harald Welte <laforge@gnumonks.org> * * All Rights Reserved * @@ -37,7 +37,6 @@ #include <osmocom/core/application.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/logging.h> -#include <osmocom/vty/ports.h> #include <osmocom/core/gsmtap_util.h> #include <osmocom/core/gsmtap.h> @@ -58,6 +57,7 @@ static int daemonize = 0; static int rt_prio = -1; static int trx_num = 1; static char *gsmtap_ip = 0; +extern int g_vty_port_num; static void print_help() { @@ -275,6 +275,7 @@ int bts_main(int argc, char **argv) fprintf(stderr, "unable to open bts\n"); exit(1); } + btsb = bts_role_bts(bts); abis_init(bts); @@ -302,13 +303,13 @@ int bts_main(int argc, char **argv) bts_controlif_setup(bts); - rc = telnet_init(tall_bts_ctx, NULL, OSMO_VTY_PORT_BTS); + rc = telnet_init(tall_bts_ctx, NULL, g_vty_port_num); if (rc < 0) { fprintf(stderr, "Error initializing telnet\n"); exit(1); } - if (pcu_sock_init()) { + if (pcu_sock_init(btsb->pcu.sock_path)) { fprintf(stderr, "PCU L1 socket failed\n"); exit(1); } @@ -319,7 +320,6 @@ int bts_main(int argc, char **argv) signal(SIGUSR2, &signal_handler); osmo_init_ignore_signals(); - btsb = bts_role_bts(bts); if (!btsb->bsc_oml_host) { fprintf(stderr, "Cannot start BTS without knowing BSC OML IP\n"); exit(1); |