summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dns.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 52e541967..285d54693 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -192,7 +192,7 @@ int DNSRequest::SendRequests(const DNSHeader *header, const int length, QueryTyp
#endif
if (sendto(DNS::GetMasterSocket(), payload, length + 12, 0, (sockaddr *) &addr, sizeof(addr)) == -1)
{
- log(DEBUG,"Error in sendto!");
+ log(DEBUG,"Error in sendto! (%s)",strerror(errno));
return -1;
}
@@ -498,6 +498,9 @@ DNSResult DNS::GetResult()
int length = recvfrom(MasterSocket,buffer,sizeof(DNSHeader),0,&from,&x);
+ if (length < 0)
+ log(DEBUG,"Error in recvfrom()! (%s)",strerror(errno));
+
/* Did we get the whole header? */
if (length < 12)
/* Nope - something screwed up. */