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
This commit is contained in:
Pau Espin 2017-12-05 17:35:22 +01:00
parent 59f50c2718
commit da0a194b57
1 changed files with 2 additions and 1 deletions

View File

@ -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;