mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
fix a bug in http_connect for windows; the address was not copied correctly.
svn:r863
This commit is contained in:
parent
2f8708db3f
commit
f80f90ed8b
@ -129,7 +129,7 @@ http_connect(const char *address, u_short port)
|
||||
if (!(he = gethostbyname(address))) {
|
||||
event_warn("gethostbyname");
|
||||
}
|
||||
memcpy(&sin.sin_addr, &he->h_addr, sizeof(struct in_addr));
|
||||
memcpy(&sin.sin_addr, he->h_addr_list[0], he->h_length);
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_port = htons(port);
|
||||
slen = sizeof(struct sockaddr_in);
|
||||
|
Loading…
x
Reference in New Issue
Block a user