summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-10-21 17:06:48 +0200
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-10-26 14:20:23 +1100
commitee97e2676de982782f8d37d0c877e5b271af5230 (patch)
tree5f82fbb4657f3d2d4d2d8d903355cabc81095a91
parent299b027b8c60ba5eade44a0aca100d79406407c4 (diff)
downloadsamba-ee97e2676de982782f8d37d0c877e5b271af5230.tar.gz
tcp: don't log an error when we succefully bind to the desired address
metze (This used to be ctdb commit 752a9c81de97be509de7e7feddde749cc5ee22a8)
-rw-r--r--ctdb/tcp/tcp_connect.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index c74487be863..e1c927d8049 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -353,9 +353,16 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
setsockopt(ctcp->listen_fd,SOL_SOCKET,SO_REUSEADDR,(char *)&one,sizeof(one));
if (bind(ctcp->listen_fd, (struct sockaddr * )&sock, sock_size) == 0) {
- DEBUG(DEBUG_ERR,(__location__ " Failed to bind() to socket. %s(%d)\n", strerror(errno), errno));
break;
}
+
+ if (errno == EADDRNOTAVAIL) {
+ DEBUG(DEBUG_DEBUG,(__location__ " Failed to bind() to socket. %s(%d)\n",
+ strerror(errno), errno));
+ } else {
+ DEBUG(DEBUG_ERR,(__location__ " Failed to bind() to socket. %s(%d)\n",
+ strerror(errno), errno));
+ }
}
if (i == ctdb->num_nodes) {