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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3160%2Fhead;p=thirdparty%2Fpdns.git Print the socket path we actually used in case of error --- diff --git a/pdns/rec_channel.cc b/pdns/rec_channel.cc index 50ddcef444..7cb37a6698 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)));