CVS: bopm/src firedns.c,1.21,1.22

[email protected] (David Leadbeater)
Newsgroups gmane.network.irc.bopm
Message-ID <[email protected]>
Update of /data/cvs/bopm/src
In directory nubian.blitzed.org:/tmp/cvs-serv50878/src

Modified Files:
	firedns.c 
Log Message:
Fix unknown error when it exists but there isn't a record of the type we
expect.


Index: firedns.c
===================================================================
RCS file: /data/cvs/bopm/src/firedns.c,v
retrieving revision 1.21
retrieving revision 1.22
diff --unified=6 -r1.21 -r1.22
--- firedns.c	12 Jan 2004 18:12:48 -0000	1.21
+++ firedns.c	3 Jun 2005 12:58:12 -0000	1.22
@@ -622,15 +622,17 @@
    if ((h.flags2 & FLAGS2_MASK_RCODE) != 0)
    {
       fdns_errno = (h.flags2 & FLAGS2_MASK_RCODE);
       goto cleanup;
    }
    h.ancount = ntohs(h.ancount);
-   if (h.ancount < 1)
+   if (h.ancount < 1) {
+      fdns_errno = FDNS_ERR_NXDOMAIN;
    /* no sense going on if we don't have any answers */
       goto cleanup;
+   }
    /* skip queries */
    i = 0;
    q = 0;
    l -= 12;
    h.qdcount = ntohs(h.qdcount);
    while (q < h.qdcount && i < l)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.