Commit 154d925f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Searh for records of type SRV and class IN. JM-731

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4083 b35dd754-fafc-0310-a699-88a17e54d16e
parent 36ec0298
......@@ -84,7 +84,8 @@ public class DNSUtil {
String host = domain;
int port = defaultPort;
try {
Attributes dnsLookup = context.getAttributes("_xmpp-server._tcp." + domain);
Attributes dnsLookup =
context.getAttributes("_xmpp-server._tcp." + domain, new String[]{"SRV"});
String srvRecord = (String)dnsLookup.get("SRV").get();
String [] srvRecordEntries = srvRecord.split(" ");
port = Integer.parseInt(srvRecordEntries[srvRecordEntries.length-2]);
......@@ -93,7 +94,8 @@ public class DNSUtil {
catch (Exception e) {
// Attempt lookup with older "jabber" name.
try {
Attributes dnsLookup = context.getAttributes("_jabber._tcp." + domain);
Attributes dnsLookup =
context.getAttributes("_jabber._tcp." + domain, new String[]{"SRV"});
String srvRecord = (String)dnsLookup.get("SRV").get();
String [] srvRecordEntries = srvRecord.split(" ");
port = Integer.parseInt(srvRecordEntries[srvRecordEntries.length-2]);
......
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