Harald Welte has submitted this change and it was merged.

Change subject: Print error cause of pcu socket connect failure
......................................................................


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
---
M src/osmobts_sock.cpp
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp
index 31715d5..577d41e 100644
--- a/src/osmobts_sock.cpp
+++ b/src/osmobts_sock.cpp
@@ -263,7 +263,8 @@
        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;

-- 
To view, visit https://gerrit.osmocom.org/5198
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>

Reply via email to