aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-04-03 11:13:45 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-04-03 11:13:45 +0200
commite70c0cfffd61a461a14d32907bb178892e940de9 (patch)
treee794c91c6589e3938c57cef085388747c0e040b6 /src/eu/siacs/conversations/xmpp
parente5940630ea75a9f89e603c6b49f8eaac28693b5b (diff)
parenteae4e5d518d8b258d87f54c3cd35f6d111b42579 (diff)
Merge pull request #40 from rtreffer/minidns
Add ability to use a provided ipv4 address on connect
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index 4323e899e..01a024dc1 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -128,11 +128,19 @@ public class XmppConnection implements Runnable {
return;
}
String srvRecordServer = namePort.getString("name");
+ String srvIpServer = namePort.getString("ipv4");
int srvRecordPort = namePort.getInt("port");
if (srvRecordServer != null) {
- Log.d(LOGTAG, account.getJid() + ": using values from dns "
+ if (srvIpServer != null) {
+ Log.d(LOGTAG, account.getJid() + ": using values from dns "
+ + srvRecordServer + "[" + srvIpServer + "]:"
+ + srvRecordPort);
+ socket = new Socket(srvIpServer, srvRecordPort);
+ } else {
+ Log.d(LOGTAG, account.getJid() + ": using values from dns "
+ srvRecordServer + ":" + srvRecordPort);
- socket = new Socket(srvRecordServer, srvRecordPort);
+ socket = new Socket(srvRecordServer, srvRecordPort);
+ }
} else {
socket = new Socket(account.getServer(), 5222);
}