mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-07 19:31:01 -04:00
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:
parent
819d4a33d7
commit
6d291da240
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user