Skip to content

Commit

Permalink
cares_get_32bit -> ReadUint32BE
Browse files Browse the repository at this point in the history
  • Loading branch information
daguej authored and aduh95 committed Oct 24, 2020
1 parent cbc571a commit 4b1c360
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cares_wrap.cc
Expand Up @@ -2249,7 +2249,7 @@ void SetLocalAddress(const FunctionCallbackInfo<Value>& args) {
// to 0 (any).

if (uv_inet_pton(AF_INET, *ip0, &addr0) == 0) {
ares_set_local_ip4(channel->cares_channel(), cares_get_32bit(addr0));
ares_set_local_ip4(channel->cares_channel(), ReadUint32BE(addr0));
type0 = 4;
} else if (uv_inet_pton(AF_INET6, *ip0, &addr0) == 0) {
ares_set_local_ip6(channel->cares_channel(), addr0);
Expand All @@ -2268,7 +2268,7 @@ void SetLocalAddress(const FunctionCallbackInfo<Value>& args) {
THROW_ERR_INVALID_ARG_VALUE(env, "Cannot specify two IPv4 addresses.");
return;
} else {
ares_set_local_ip4(channel->cares_channel(), cares_get_32bit(addr1));
ares_set_local_ip4(channel->cares_channel(), ReadUint32BE(addr1));
}
} else if (uv_inet_pton(AF_INET6, *ip1, &addr1) == 0) {
if (type0 == 6) {
Expand Down

0 comments on commit 4b1c360

Please sign in to comment.