Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
e2a conversions for canonical ip
Browse files Browse the repository at this point in the history
  • Loading branch information
jBarz committed Mar 8, 2018
1 parent 4e7bf44 commit ed1086a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cares_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,9 @@ static void IsIPv6(const FunctionCallbackInfo<Value>& args) {
void CanonicalizeIP(const FunctionCallbackInfo<Value>& args) {
v8::Isolate* isolate = args.GetIsolate();
node::Utf8Value ip(isolate, args[0]);
#ifdef __MVS__
__a2e_s(*ip);
#endif
char address_buffer[sizeof(struct in6_addr)];
char canonical_ip[INET6_ADDRSTRLEN];

Expand All @@ -1311,6 +1314,9 @@ void CanonicalizeIP(const FunctionCallbackInfo<Value>& args) {
sizeof(canonical_ip));
CHECK_EQ(err, 0);

#ifdef __MVS__
__e2a_s(canonical_ip);
#endif
args.GetReturnValue().Set(String::NewFromUtf8(isolate, canonical_ip));
}

Expand Down

0 comments on commit ed1086a

Please sign in to comment.