IPA authentication working.
[lgpl/argeo-commons.git] / org.argeo.enterprise / src / org / argeo / naming / DnsBrowser.java
index 62667c5180920001f1bb9c679487886a0b97d280..d9358c0830ee71f6130649e611a95f77eb3defae 100644 (file)
@@ -79,7 +79,7 @@ public class DnsBrowser implements Closeable {
        }
 
        /** Ordered, with preferred first. */
-       public List<String> getSrvRecordsAsHosts(String name) throws NamingException {
+       public List<String> getSrvRecordsAsHosts(String name, boolean withPort) throws NamingException {
                List<String> raw = getRecords(name, "SRV");
                if (raw.size() == 0)
                        return null;
@@ -96,7 +96,7 @@ public class DnsBrowser implements Closeable {
                }
                List<String> lst = new ArrayList<>();
                for (SrvRecord order : res) {
-                       lst.add(order.toHost());
+                       lst.add(order.toHost(withPort));
                }
                return Collections.unmodifiableList(lst);
        }