Verified Commit e140ab71 authored by Martin/Geno's avatar Martin/Geno

Networkstack - let OS decide IPv4 or IPv6

parent db12bae1
Pipeline #399 passed with stage
in 10 minutes and 18 seconds
......@@ -156,7 +156,6 @@ public class DatabaseBackend extends SQLiteOpenHelper {
private static String CREATE_RESOLVER_RESULTS_TABLE = "create table " + RESOLVER_RESULTS_TABLENAME + "("
+ Resolver.Result.DOMAIN + " TEXT,"
+ Resolver.Result.HOSTNAME + " TEXT,"
+ Resolver.Result.IP + " BLOB,"
+ Resolver.Result.PRIORITY + " NUMBER,"
+ Resolver.Result.DIRECT_TLS + " NUMBER,"
+ Resolver.Result.AUTHENTICATED + " NUMBER,"
......
......@@ -314,18 +314,10 @@ public class XmppConnection implements Runnable {
features.encryptionEnabled = result.isDirectTls();
verifiedHostname = result.isAuthenticated() ? result.getHostname().toString() : null;
Log.d(Config.LOGTAG,"verified hostname "+verifiedHostname);
final InetSocketAddress addr;
if (result.getIp() != null) {
addr = new InetSocketAddress(result.getIp(), result.getPort());
Log.d(Config.LOGTAG, account.getJid().asBareJid().toString()
+ ": using values from resolver " + (result.getHostname() == null ? "" : result.getHostname().toString()
+ "/") + result.getIp().getHostAddress() + ":" + result.getPort() + " tls: " + features.encryptionEnabled);
} else {
addr = new InetSocketAddress(IDN.toASCII(result.getHostname().toString()), result.getPort());
Log.d(Config.LOGTAG, account.getJid().asBareJid().toString()
+ ": using values from resolver "
+ result.getHostname().toString() + ":" + result.getPort() + " tls: " + features.encryptionEnabled);
}
final InetSocketAddress addr = new InetSocketAddress(IDN.toASCII(result.getHostname().toString()), result.getPort());
Log.d(Config.LOGTAG, account.getJid().asBareJid().toString()
+ ": using values from resolver "
+ result.getHostname().toString() + ":" + result.getPort() + " tls: " + features.encryptionEnabled);
if (!features.encryptionEnabled) {
localSocket = new Socket();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment