mirror of https://github.com/ARMmbed/mbed-os.git
Fix SocketAddress constructor to support ipv6
Fix typo causing ipv6 addresses in the constructor to fail.pull/2216/head^2
parent
1c0a7c2426
commit
c3baf2792e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue