Don't set AI_CANONNAME when calling getaddrinfo()
authorDan Winship <danw@gnome.org>
Mon, 18 May 2009 13:46:30 +0000 (09:46 -0400)
committerDan Winship <danw@gnome.org>
Mon, 18 May 2009 13:46:30 +0000 (09:46 -0400)
We weren't using the information it generated, so it had no effect
besides slowing things down with additional DNS traffic. Pointed out
by Christophe Gillette on libsoup-list.

libsoup/soup-dns.c

index cb4cee5..68a2e74 100644 (file)
@@ -338,9 +338,7 @@ resolve_address (SoupDNSCacheEntry *entry)
 
        memset (&hints, 0, sizeof (struct addrinfo));
 #  ifdef AI_ADDRCONFIG
-       hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
-#  else
-       hints.ai_flags = AI_CANONNAME;
+       hints.ai_flags = AI_ADDRCONFIG;
 #  endif
        hints.ai_family = PF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;