-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.109 2011/09/04 11:10:56 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.113 2012/03/09 16:23:50 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
{
log_error(LOG_LEVEL_ERROR,
"Attempt %d of %d to connect to %s failed. Trying again.",
- forwarded_connect_retries, csp->config->forwarded_connect_retries, host);
+ forwarded_connect_retries, csp->config->forwarded_connect_retries + 1, host);
}
} while (forwarded_connect_retries < csp->config->forwarded_connect_retries);
log_error(LOG_LEVEL_ERROR, "getsockname() truncated server address");
return;
}
+/*
+ * XXX: Workaround for missing header on Windows when
+ * configured with --disable-ipv6-support.
+ * The proper fix is to not use NI_MAXSERV in
+ * that case. It works by accident on other platforms
+ * as <netdb.h> in included unconditionally there.
+ */
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
*port = malloc(NI_MAXSERV);
if (NULL == *port)
{
log_error(LOG_LEVEL_ERROR, "hostname %s resolves to unknown address type.", host);
return(INADDR_NONE);
}
- memcpy(
- (char *) &inaddr.sin_addr,
- (char *) hostp->h_addr,
- sizeof(inaddr.sin_addr)
- );
+ memcpy((char *)&inaddr.sin_addr, (char *)hostp->h_addr, sizeof(inaddr.sin_addr));
}
return(inaddr.sin_addr.s_addr);