mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
make tor-resolve -x work on intel-endian platforms too
svn:r9274
This commit is contained in:
parent
81bcab21fc
commit
71ed0314f6
@ -85,7 +85,7 @@ build_socks_resolve_request(char **out,
|
|||||||
(*out)[2] = 0; /* reserved. */
|
(*out)[2] = 0; /* reserved. */
|
||||||
(*out)[3] = is_ip_address ? 1 : 3;
|
(*out)[3] = is_ip_address ? 1 : 3;
|
||||||
if (is_ip_address) {
|
if (is_ip_address) {
|
||||||
set_uint32((*out)+4, htonl(in.s_addr));
|
set_uint32((*out)+4, in.s_addr);
|
||||||
} else {
|
} else {
|
||||||
(*out)[4] = (char)(uint8_t)(addrlen - 1);
|
(*out)[4] = (char)(uint8_t)(addrlen - 1);
|
||||||
memcpy((*out)+5, hostname, addrlen - 1);
|
memcpy((*out)+5, hostname, addrlen - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user