]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix DNS query id assignment (got broken in previous change)
authorhno <>
Mon, 9 May 2005 08:35:57 +0000 (08:35 +0000)
committerhno <>
Mon, 9 May 2005 08:35:57 +0000 (08:35 +0000)
src/dns_internal.cc

index 89813751e950921e439e3e89d1af82acb5b45b76..7d64baebb64a98e63306c307285e511b8cde784d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.cc,v 1.70 2005/05/09 02:32:09 hno Exp $
+ * $Id: dns_internal.cc,v 1.71 2005/05/09 02:35:57 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -931,7 +931,9 @@ idnsALookup(const char *name, IDNSCB * callback, void *data)
 
     q = (idns_query *)memAllocate(MEM_IDNS_QUERY);
 
-    q->sz = rfc1035BuildAQuery(name, q->buf, sizeof(q->buf), idnsQueryID());
+    q->id = idnsQueryID();
+
+    q->sz = rfc1035BuildAQuery(name, q->buf, sizeof(q->buf), q->id);
 
     debug(78, 3) ("idnsALookup: buf is %d bytes for %s, id = %#hx\n",
                   (int) q->sz, name, q->id);
@@ -960,7 +962,9 @@ idnsPTRLookup(const struct IN_ADDR addr, IDNSCB * callback, void *data)
 
     q = (idns_query *)memAllocate(MEM_IDNS_QUERY);
 
-    q->sz = rfc1035BuildPTRQuery(addr, q->buf, sizeof(q->buf), idnsQueryID());
+    q->id = idnsQueryID();
+
+    q->sz = rfc1035BuildPTRQuery(addr, q->buf, sizeof(q->buf), q->id);
 
     debug(78, 3) ("idnsPTRLookup: buf is %d bytes for %s, id = %#hx\n",
                   (int) q->sz, ip, q->id);