aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmobts_sock.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-12-05 17:35:22 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2017-12-05 18:44:06 +0100
commitda0a194b577df4088de1cc41da19363d014ab94c (patch)
treea6d8dbcffe25902f943df703e0d6ff808d986eb6 /src/osmobts_sock.cpp
parent59f50c2718ba30479449ed31ed2202f7a797ca1d (diff)
Print error cause of pcu socket connect failure
This log is useful to quickly debug scenarions in which pcu never connects to bts. For instance, if bts is started as root and pcu is not, pcu will fail to connect to the socket and will fail with "Permission Denied". Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded
Diffstat (limited to 'src/osmobts_sock.cpp')
-rw-r--r--src/osmobts_sock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp
index 31715d50..577d41eb 100644
--- a/src/osmobts_sock.cpp
+++ b/src/osmobts_sock.cpp
@@ -263,7 +263,8 @@ int pcu_l1if_open(void)
rc = connect(bfd->fd, (struct sockaddr *) &local, namelen);
if (rc != 0) {
LOGP(DL1IF, LOGL_ERROR, "Failed to connect to the osmo-bts"
- " PCU socket, delaying... '%s'\n", local.sun_path);
+ " PCU socket (%s), delaying... '%s'\n",
+ strerror(errno), local.sun_path);
pcu_sock_state = state;
close(bfd->fd);
bfd->fd = -1;