aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Whited <sam@samwhited.com>2014-11-07 23:08:31 -0500
committerSam Whited <sam@samwhited.com>2014-11-09 07:00:40 -0500
commitfc594e9b7302893f8ff0b27ae9db9a2f815a539a (patch)
tree101d9a66492d2c132da1f71a2fa8c286c16e6c89
parent02db197a89fb7b305f03f3bc0f3a55dd0abaa268 (diff)
Fix issue with IDN SRV records
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 11cbca81..534a6667 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -18,6 +18,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigInteger;
+import java.net.IDN;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.UnknownHostException;
@@ -156,7 +157,7 @@ public class XmppConnection implements Runnable {
while (socketError && values.size() > i) {
Bundle namePort = (Bundle) values.get(i);
try {
- String srvRecordServer = namePort.getString("name");
+ String srvRecordServer = IDN.toASCII(namePort.getString("name"));
int srvRecordPort = namePort.getInt("port");
String srvIpServer = namePort.getString("ipv4");
InetSocketAddress addr;
@@ -363,7 +364,7 @@ public class XmppConnection implements Runnable {
nextTag = tagReader.readTag();
}
if (account.getStatus() == Account.STATUS_ONLINE) {
- account.setStatus(Account.STATUS_OFFLINE);
+ account. setStatus(Account.STATUS_OFFLINE);
if (statusListener != null) {
statusListener.onStatusChanged(account);
}