[SCM] The rsync repository. - branch b3.0.x updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Tue Jul 12 17:49:20 MDT 2011
The branch, b3.0.x has been updated
via 606c603 Add more connect debug info, as Carlos suggested.
from 5fed6c0 Move freeaddrinfo() call after failure-reporting loop.
;a=shortlog;h=b3.0.x
- Log -----------------------------------------------------------------
commit 606c6039431e8eb3558ffb4ac6a0769864660bb4
Author: Wayne Davison <wayned at samba.org>
Date: Tue Jul 12 15:58:11 2011 -0700
Add more connect debug info, as Carlos suggested.
-----------------------------------------------------------------------
Summary of changes:
socket.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/socket.c b/socket.c
index f2f79f7..855fc09 100644
--- a/socket.c
+++ b/socket.c
@@ -297,10 +297,17 @@ int open_socket_out(char *host, int port, const char *bind_addr,
s = -1;
continue;
}
+ if (verbose >= 3) {
+ char buf[2048];
+ if ((error = getnameinfo(res->ai_addr, res->ai_addrlen, buf, sizeof buf, NULL, 0, NI_NUMERICHOST) != 0))
+ rprintf(FINFO, "error in getnameinfo: %s\n", gai_strerror(error));
+ else
+ rprintf(FINFO, "Connected to %s (%s)\n", h, buf);
+ }
break;
}
- if (s < 0) {
+ if (s < 0 || verbose >= 3) {
char buf[2048];
for (res = res0, j = 0; res; res = res->ai_next, j++) {
if (errnos[j] == 0)
@@ -309,7 +316,8 @@ int open_socket_out(char *host, int port, const char *bind_addr,
strlcpy(buf, "*inet_ntop failed*", sizeof buf);
rsyserr(FERROR, errnos[j], "failed to connect to %s (%s)", h, buf);
}
- s = -1;
+ if (s < 0)
+ s = -1;
}
freeaddrinfo(res0);
--
The rsync repository.
More information about the rsync-cvs
mailing list