mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
ctdb-client: Print error message before next syscall to avoid losing errno
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
94018302fd
commit
1710b14a3c
@ -289,9 +289,12 @@ int ctdb_socket_connect(struct ctdb_context *ctdb)
|
||||
}
|
||||
|
||||
if (connect(ctdb->daemon.sd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
|
||||
DEBUG(DEBUG_ERR,
|
||||
(__location__
|
||||
"Failed to connect client socket to daemon (%s)\n",
|
||||
strerror(errno)));
|
||||
close(ctdb->daemon.sd);
|
||||
ctdb->daemon.sd = -1;
|
||||
DEBUG(DEBUG_ERR,(__location__ " Failed to connect client socket to daemon. Errno:%s(%d)\n", strerror(errno), errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user