summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-05-24 22:22:20 +0000
committerJakub Jelinek <jakub@redhat.com>2008-05-24 22:22:20 +0000
commit8ba7d5cebbd4acf40dc8d22982baa50c2e1fd194 (patch)
treece09df60a6357e43ff65911fc7e817bcae26486f /resolv
parente96fe50f0dd8d76fabfe139b46f059e3b2373b83 (diff)
Updated to fedora-glibc-20080524T2218cvs/fedora-glibc-2_8_90-5
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_send.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index e67ef1c676..e78ff967aa 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -1001,12 +1001,12 @@ send_dg(res_state statp,
need_recompute = 1;
}
if (n == 0) {
- Dprint(statp->options & RES_DEBUG, (stdout,
- ";; timeout sending\n"));
- if (recvresp1)
- return resplen;
- if (buf2 != NULL && recvresp2)
- return 1;
+ Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
+ if (recvresp1 || (buf2 != NULL && recvresp2))
+ {
+ *resplen2 = 1;
+ return resplen;
+ }
*gotsomewhere = 1;
return (0);
@@ -1184,6 +1184,24 @@ send_dg(res_state statp,
thisansp,
(*thisresplen > *thisanssiz)
? *thisanssiz : *thisresplen);
+
+ if (recvresp1 || (buf2 != NULL && recvresp2))
+ {
+ *resplen2 = 1;
+ return resplen;
+ }
+ if (buf2 != NULL)
+ {
+ /* We are waiting for a possible second reply. */
+ resplen = 1;
+ if (hp->id == anhp->id)
+ recvresp1 = 1;
+ else
+ recvresp2 = 1;
+
+ goto wait;
+ }
+
next_ns:
__res_iclose(statp, false);
/* don't retry if called from dig */