diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-03 20:58:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-03 20:58:03 +0000 |
commit | 2e411dd9a554e70fb0ec6063dfcfafefbd568522 (patch) | |
tree | a8a552ee3c7cbea40a923f377be5cb7f66dc31c3 | |
parent | 327a3847ff063cfdb9417c7e3d1d025cf7fc0566 (diff) |
Add strerror stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4683 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/dns.cpp | 5 |
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. */ |