From: Remi Gacogne Date: Mon, 4 Jan 2016 17:32:10 +0000 (+0100) Subject: Print the socket path we actually used in case of error X-Git-Tag: dnsdist-1.0.0-alpha2~125^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8effb50c470f6a683381e40dfd05e021da909d79;p=pdns Print the socket path we actually used in case of error --- diff --git a/pdns/rec_channel.cc b/pdns/rec_channel.cc index 50ddcef44..7cb37a669 100644 --- a/pdns/rec_channel.cc +++ b/pdns/rec_channel.cc @@ -118,7 +118,7 @@ void RecursorControlChannel::send(const std::string& msg, const std::string* rem remoteaddr.sun_path[sizeof(remoteaddr.sun_path)-1] = '\0'; if(::sendto(d_fd, msg.c_str(), msg.length(), 0, (struct sockaddr*) &remoteaddr, sizeof(remoteaddr) ) < 0) - throw PDNSException("Unable to send message over control channel '"+*remote+"': "+string(strerror(errno))); + throw PDNSException("Unable to send message over control channel '"+string(remoteaddr.sun_path)+"': "+string(strerror(errno))); } else if(::send(d_fd, msg.c_str(), msg.length(), 0) < 0) throw PDNSException("Unable to send message over control channel: "+string(strerror(errno)));