From 3f13e5969befae3b7adfadae3d2724d6cda5d7b5 Mon Sep 17 00:00:00 2001 From: Michael Sawyer Date: Mon, 26 Jun 2000 21:28:17 +0000 Subject: [PATCH] Don't have dig (et al) fall back to TCP mode after non-responsive UDP attempts. --- bin/dig/dighost.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index ec25898d50..abfb530854 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: dighost.c,v 1.58 2000/06/26 00:57:18 gson Exp $ */ +/* $Id: dighost.c,v 1.59 2000/06/26 21:28:17 mws Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -1251,7 +1251,7 @@ send_udp(dig_lookup_t *lookup) { /* connect_timeout is used for both UDP recieves and TCP connects. */ static void connect_timeout(isc_task_t *task, isc_event_t *event) { - dig_lookup_t *lookup=NULL, *next=NULL; + dig_lookup_t *lookup=NULL; dig_query_t *q=NULL; isc_result_t result; isc_buffer_t *b=NULL; @@ -1284,24 +1284,12 @@ connect_timeout(isc_task_t *task, isc_event_t *event) { q->lookup->textname, q->lookup->retries-1); else { - if (lookup->tcp_mode) { - printf(";; Connection to " - "server %.*s " - "for %s timed out. " - "Giving up.\n", - (int)r.length, r.base, - q->lookup->textname); - } else { - printf(";; Connection to " - "server %.*s " - "for %s timed out. " - "Trying TCP.\n", - (int)r.length, r.base, - q->lookup->textname); - next = requeue_lookup - (lookup,ISC_TRUE); - next->tcp_mode = ISC_TRUE; - } + printf(";; Connection to " + "server %.*s " + "for %s timed out. " + "Giving up.\n", + (int)r.length, r.base, + q->lookup->textname); } } isc_socket_cancel(q->sock, task,