]> granicus.if.org Git - libevent/commitdiff
Fix badly-behaved subtest of dns/bufferevent_connect_hostname
authorJoachim Bauch <mail@joachim-bauch.de>
Fri, 30 Jul 2010 00:32:40 +0000 (20:32 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 30 Jul 2010 00:32:40 +0000 (20:32 -0400)
The bufferevent_connect_hostname test was specifying AF_INET, but the
gethostbyname test we were using to see what error to expect was using
PF_UNSPEC, leading to possible divergence of results.

test/regress_dns.c

index c2ea8c3f1e4b9d2874c1671f603942bb21f36b98..deee766ee14771db7410eb9f3d7be9f95fcc4190 100644 (file)
@@ -1087,7 +1087,7 @@ test_bufferevent_connect_hostname(void *arg)
                 * example.com is real.) Let's see what answer to expect. */
                struct evutil_addrinfo hints, *ai = NULL;
                memset(&hints, 0, sizeof(hints));
-               hints.ai_family = PF_UNSPEC;
+               hints.ai_family = AF_INET;
                hints.ai_socktype = SOCK_STREAM;
                hints.ai_protocol = IPPROTO_TCP;
                expect_err5 = evutil_getaddrinfo(