From 6d291da240607b5ab6a3931ae761439c1880a9a4 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 28 Dec 2007 00:34:05 +0000 Subject: [PATCH] Fix at least two bugs that are keeping the HTTP regression tests from running on windows. There are some more bugs somewhere, since the HTTP regression tests still fail on windows. But now they fail less. svn:r619 --- test/regress_http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/regress_http.c b/test/regress_http.c index 05c7da0d..4f3b955a 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -122,6 +122,7 @@ http_connect(const char *address, u_short port) event_warn("gethostbyname"); } memcpy(&sin.sin_addr, &he->h_addr, sizeof(struct in_addr)); + sin.sin_family = AF_INET; sin.sin_port = htons(port); slen = sizeof(struct sockaddr_in); sa = (struct sockaddr*)&sin; @@ -142,6 +143,7 @@ http_connect(const char *address, u_short port) if (fd == -1) event_err(1, "socket failed"); + evutil_make_socket_nonblocking(fd); if (connect(fd, sa, slen) == -1) event_err(1, "connect failed");