[MERGED] osmo-pcu[master]: Print error cause of pcu socket connect failure

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Dec 5 18:41:58 UTC 2017


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 <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list