diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2017-01-07 12:49:30 +0100 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2017-01-07 12:49:30 +0100 |
commit | 6296c62a54d81e14182bacc507361d7e07e89d69 (patch) | |
tree | 82dc2c4f7c146f14e30a36cc4f7b4952ff5a8f71 /src | |
parent | 0929ebc962add1fe4e6f22d0d6efb3d676671466 (diff) | |
download | jitsi-6296c62a54d81e14182bacc507361d7e07e89d69.zip jitsi-6296c62a54d81e14182bacc507361d7e07e89d69.tar.gz jitsi-6296c62a54d81e14182bacc507361d7e07e89d69.tar.bz2 |
Use NetworkUtils to handle all IPv6 formats
Diffstat (limited to 'src')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/sip/AddressResolverImpl.java | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/AddressResolverImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/AddressResolverImpl.java index eba0da6..4fd1b6f 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/AddressResolverImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/AddressResolverImpl.java @@ -70,18 +70,8 @@ public class AddressResolverImpl // if it is a textual IP address, do no try to resolve it if(NetworkUtils.isValidIPAddress(hostAddress)) { - byte[] addr = null; - - addr = NetworkUtils.strToIPv4(hostAddress); - - // not an IPv4, try IPv6 - if (addr == null) - { - addr = NetworkUtils.strToIPv6(hostAddress); - } - InetSocketAddress hostSocketAddress = new InetSocketAddress( - InetAddress.getByAddress(hostAddress, addr), + NetworkUtils.getInetAddress(hostAddress), inputAddress.getPort()); return new HopImpl(hostSocketAddress.getHostName(), inputAddress.getPort(), |