]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add strerror stuff
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 3 Aug 2006 20:58:03 +0000 (20:58 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 3 Aug 2006 20:58:03 +0000 (20:58 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4683 e03df62e-2008-0410-955e-edbf42e46eb7

src/dns.cpp

index 52e5419679780a6788d5e1ddb5a9487b5ff37bd8..285d546937449bb545aa124483fd6ed221b07a3b 100644 (file)
@@ -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. */