Fix SocketAddress constructor to support ipv6

Fix typo causing ipv6 addresses in the constructor to fail.
pull/2216/head^2
Russ Butler 2016-05-17 08:24:10 -05:00 committed by Christopher Haster
parent 1c0a7c2426
commit c3baf2792e
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ SocketAddress::SocketAddress(NetworkStack *iface, const char *host, uint16_t por
set_port(port); set_port(port);
} else if (host && ipv6_is_valid(host)) { } else if (host && ipv6_is_valid(host)) {
_ip_version = NSAPI_IPv6; _ip_version = NSAPI_IPv6;
ipv4_from_address(_ip_bytes, host); ipv6_from_address(_ip_bytes, host);
set_port(port); set_port(port);
} else { } else {
// DNS lookup // DNS lookup