int err = errno;
close(pipefds[0]);
close(pipefds[1]);
- errlog("Error setting the TCP thread communication pipe non-blocking: %s", strerror(err));
+ errlog("Error setting the TCP thread communication pipe non-blocking: %s", stringerror(err));
return;
}
int err = errno;
close(pipefds[0]);
close(pipefds[1]);
- errlog("Error setting the TCP thread communication pipe non-blocking: %s", strerror(err));
+ errlog("Error setting the TCP thread communication pipe non-blocking: %s", stringerror(err));
return;
}
}
s=socket(AF_INET,SOCK_DGRAM,0);
if(s<0) {
- g_log<<Logger::Error<<"Unable to acquire UDP socket: "+stringerror() << endl;
- throw PDNSException("Unable to acquire a UDP socket: "+stringerror());
+ int err = errno;
+ g_log<<Logger::Error<<"Unable to acquire UDP socket: "+stringerror(err) << endl;
+ throw PDNSException("Unable to acquire a UDP socket: "+stringerror(err));
}
setCloseOnExec(s);
if (setsockopt(fd, SOL_SOCKET, optname, (char*)&size, sizeof(size)) < 0) {
int err = errno;
- g_log << Logger::Error << "Unable to raise socket buffer size to " << size << ": " << strerror(err) << endl;
+ g_log << Logger::Error << "Unable to raise socket buffer size to " << size << ": " << stringerror(err) << endl;
}
}
else {
int err = errno;
g_log << Logger::Error << "Writing pid for " << Utility::getpid() << " to " << s_pidfname << " failed: "
- << strerror(err) << endl;
+ << stringerror(err) << endl;
}
}
g_log<<Logger::Error<<"IPv6 Address " << *laddr << " does not exist on this server - skipping TCP bind" << endl;
continue;
} else {
- g_log<<Logger::Error<<"Unable to bind to TCPv6 socket" << *laddr << ": "<<strerror(err)<<endl;
+ g_log<<Logger::Error<<"Unable to bind to TCPv6 socket" << *laddr << ": "<<stringerror(err)<<endl;
throw PDNSException("Unable to bind to TCPv6 socket");
}
}