From 8effb50c470f6a683381e40dfd05e021da909d79 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 4 Jan 2016 18:32:10 +0100 Subject: [PATCH] Print the socket path we actually used in case of error --- pdns/rec_channel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))); -- 2.50.0