summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-06-11 10:07:33 -0700
committerUlrich Drepper <drepper@redhat.com>2009-06-11 10:07:33 -0700
commit310647e9809986986650994d036af18ca9b17fb2 (patch)
tree9e28d7c9cfeac1b63d67155e9d6959923dc64189 /resolv
parent88ea382fda5af7717f85bb19837c9c99094f3df4 (diff)
downloadglibc-310647e9809986986650994d036af18ca9b17fb2.tar.gz
glibc-310647e9809986986650994d036af18ca9b17fb2.tar.xz
glibc-310647e9809986986650994d036af18ca9b17fb2.zip
Remember we switched to single-request mode.
This change prevents repetition in most later calls of the resolver
in case the DNS server or the network connection is broken.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_send.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 25a854f72e..39c69da2bc 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -1008,7 +1008,7 @@ send_dg(res_state statp,
 		seconds /= statp->nscount;
 	if (seconds <= 0)
 		seconds = 1;
-	bool single_request = ((statp->options) & RES_SNGLKUP) != 0;// XXX
+	bool single_request = (statp->options & RES_SNGLKUP) != 0;// XXX
 	int save_gotsomewhere = *gotsomewhere;
  retry:
 	evNowTime(&now);
@@ -1059,6 +1059,7 @@ send_dg(res_state statp,
 		       have received the first answer.  */
 		    if (!single_request)
 		      {
+			statp->options |= RES_SNGLKUP;
 			single_request = true;
 			*gotsomewhere = save_gotsomewhere;
 			goto retry;