Show 19 quoted lines
> @@ -511,10 +537,19 @@ static int git_tcp_connect_sock(char *host)
>
> if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) {
> saved_errno = errno;
> + fprintf(stderr, "%s[%d: %s]: net=%s, errno=%s\n",
> + host,
> + cnt,
> + inet_ntoa(*(struct in_addr *)&sa.sin_addr),
> + hstrerror(h_errno),
> + strerror(saved_errno));
> close(sockfd);
> sockfd = -1;
> continue;
> }
> + fprintf(stderr, "using %s[%s]\n",
> + host,
> + inet_ntoa(*(struct in_addr *)&sa.sin_addr));
> break;
> }