]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2029. [bug] host printed out the server multiple times when
authorMark Andrews <marka@isc.org>
Tue, 23 May 2006 04:43:47 +0000 (04:43 +0000)
committerMark Andrews <marka@isc.org>
Tue, 23 May 2006 04:43:47 +0000 (04:43 +0000)
                        specified on the command line. [RT #15992]

CHANGES
bin/dig/host.c

diff --git a/CHANGES b/CHANGES
index 8e3cf3b757cda0a1e95df45bc85da415c82e0b4a..c5d7ab5395f3fcc60127dab92441a162f76e484b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2029.  [bug]           host printed out the server multiple times when
+                       specified on the command line. [RT #15992]
+
 2028.  [port]          linux: socket.c compatability for old systems.
                        [RT #16015]
 
index 10fd985d6181cfaa19a84eb5af0db0e52eae635b..7d8ce9b80b1ae739fc4426b820ec19bd854cec5e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: host.c,v 1.76.2.5.2.15 2006/03/02 23:48:48 marka Exp $ */
+/* $Id: host.c,v 1.76.2.5.2.16 2006/05/23 04:43:47 marka Exp $ */
 
 #include <config.h>
 #include <limits.h>
@@ -46,6 +46,7 @@ static isc_boolean_t default_lookups = ISC_TRUE;
 static int seen_error = -1;
 static isc_boolean_t list_addresses = ISC_TRUE;
 static dns_rdatatype_t list_type = dns_rdatatype_a;
+static isc_boolean_t printed_server = ISC_FALSE;
 
 static const char *opcodetext[] = {
        "QUERY",
@@ -394,7 +395,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
         */
        force_error = (seen_error == 1) ? 1 : 0;
        seen_error = 1;
-       if (listed_server) {
+       if (listed_server && !printed_server) {
                char sockstr[ISC_SOCKADDR_FORMATSIZE];
 
                printf("Using domain server:\n");
@@ -403,6 +404,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                                    sizeof(sockstr));
                printf("Address: %s\n", sockstr);
                printf("Aliases: \n\n");
+               printed_server = ISC_TRUE;
        }
 
        if (msg->rcode != 0) {