-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.80 2011/03/27 13:51:04 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.83 2011/03/27 13:53:25 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
}
forwarded_connect_retries++;
log_error(LOG_LEVEL_ERROR,
- "Attempt %d to connect to %s failed. Trying again.",
- forwarded_connect_retries, host);
+ "Attempt %d of %d to connect to %s failed. Trying again.",
+ forwarded_connect_retries, csp->config->forwarded_connect_retries, host);
} while (forwarded_connect_retries < csp->config->forwarded_connect_retries);
}
retval = getnameinfo(rp->ai_addr, rp->ai_addrlen,
csp->http->host_ip_addr_str, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
- if (!csp->http->host_ip_addr_str || retval)
+ if (retval)
{
log_error(LOG_LEVEL_ERROR,
"Can not save csp->http->host_ip_addr_str: %s",
- (csp->http->host_ip_addr_str) ?
- gai_strerror(retval) : "Insufficient memory");
+ gai_strerror(retval));
freez(csp->http->host_ip_addr_str);
continue;
}
if ((select((int)fd + 1, NULL, &wfds, NULL, tv) > 0)
&& FD_ISSET(fd, &wfds))
{
- /*
- * See Linux connect(2) man page for more info
- * about connecting on non-blocking socket.
- */
int socket_in_error;
socklen_t optlen = sizeof(socket_in_error);
if (!getsockopt(fd, SOL_SOCKET, SO_ERROR, &socket_in_error, &optlen))