fixed ip reporting for dns look ups

This commit is contained in:
Daniel Gultsch 2017-06-22 00:09:59 +02:00
parent 2ed71df01a
commit 3c90dbe723
2 changed files with 3 additions and 3 deletions

View File

@ -56,9 +56,9 @@ public class AndroidUsingLinkProperties extends AbstractDNSServerLookupMechanism
List<String> out = new ArrayList<>();
for(InetAddress addr : in) {
if (addr instanceof Inet4Address) {
out.add(0, addr.toString());
out.add(0, addr.getHostAddress());
} else {
out.add(addr.toString());
out.add(addr.getHostAddress());
}
}
return out;

View File

@ -366,7 +366,7 @@ public class XmppConnection implements Runnable {
addr = new InetSocketAddress(result.getIp(), result.getPort());
Log.d(Config.LOGTAG, account.getJid().toBareJid().toString()
+ ": using values from dns " + result.getHostname().toString()
+ "[" + result.getIp().toString() + "]:" + result.getPort() + " tls: " + features.encryptionEnabled);
+ "/" + result.getIp().getHostAddress() + ":" + result.getPort() + " tls: " + features.encryptionEnabled);
} else {
addr = new InetSocketAddress(result.getHostname().toString(), result.getPort());
Log.d(Config.LOGTAG, account.getJid().toBareJid().toString()