Merge
authorandrew
Fri, 28 May 2010 17:01:20 +0100
changeset 5626 f0a0028ce788
parent 5625 84f7c40fa33e (current diff)
parent 5624 302c8bd0d942 (diff)
child 5627 e636ac7a63a4
Merge
--- a/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	Fri May 28 16:59:44 2010 +0100
+++ b/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	Fri May 28 17:01:20 2010 +0100
@@ -525,11 +525,11 @@
         }
         byte[] pkt;
         if ((pkt = (byte[]) resps.get(xid)) != null) {
+            checkResponseCode(new Header(pkt, pkt.length));
             synchronized (queuesLock) {
                 resps.remove(xid);
                 reqs.remove(xid);
             }
-            checkResponseCode(new Header(pkt, pkt.length));
 
             if (debug) {
                 dprint("FOUND (" + Thread.currentThread() +
@@ -562,12 +562,12 @@
                 dprint("XID MATCH:" + xid);
             }
 
+            checkResponseCode(hdr);
             // remove the response for the xid if received by some other thread.
             synchronized (queuesLock) {
                 resps.remove(xid);
                 reqs.remove(xid);
             }
-            checkResponseCode(hdr);
             return true;
         }