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
This commit is contained in:
Nick Mathewson 2007-12-28 00:34:05 +00:00
parent 819d4a33d7
commit 6d291da240

View File

@ -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");