if ((result = getaddrinfo(host, NULL, &hints, &ai)) != 0) {
throw Exception("unable to resolve host by name: %s",
- gai_strerror(result));
+ gai_strerror(result));
}
// This logic is too complex for the compiler to determine if
err = errorNumber;
#ifndef WIN32
if (err == EINTR)
- continue;
+ continue;
#endif
closesocket(sock);
break;
#ifdef HAVE_GETADDRINFO
if (peeraddr.u.sa.sa_family == AF_INET6)
return IN6_ARE_ADDR_EQUAL(&peeraddr.u.sin6.sin6_addr,
- &myaddr.u.sin6.sin6_addr);
+ &myaddr.u.sin6.sin6_addr);
#endif
if (peeraddr.u.sa.sa_family == AF_INET)
bool TcpSocket::enableNagles(int sock, bool enable) {
int one = enable ? 0 : 1;
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
- (char *)&one, sizeof(one)) < 0) {
+ (char *)&one, sizeof(one)) < 0) {
int e = errorNumber;
vlog.error("unable to setsockopt TCP_NODELAY: %d", e);
return false;