aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/pcu_sock.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-20 23:34:43 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-15 14:27:52 +0100
commita9a7120c82f571554e6c1417eec0803f15e6c7bb (patch)
treefcfd92dd0f13f9edacc7ff8a22f45bbe264213d9 /src/common/pcu_sock.c
parent5dfb115eaf16a5c5e9ccea5b03374651aa97da11 (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/pcu_sock.c')
-rw-r--r--src/common/pcu_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 34c6e74b..7c835fb9 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -809,7 +809,7 @@ static int pcu_sock_accept(struct osmo_fd *bfd, unsigned int flags)
return 0;
}
-int pcu_sock_init(void)
+int pcu_sock_init(const char *path)
{
struct pcu_sock_state *state;
struct osmo_fd *bfd;
@@ -825,7 +825,7 @@ int pcu_sock_init(void)
bfd = &state->listen_bfd;
- rc = osmo_unixsock_listen(bfd, SOCK_SEQPACKET, "/tmp/pcu_bts");
+ rc = osmo_unixsock_listen(bfd, SOCK_SEQPACKET, path);
if (rc < 0) {
LOGP(DPCU, LOGL_ERROR, "Could not create unix socket: %s\n",
strerror(errno));