always add a non resolved SRV record to the list
This commit is contained in:
parent
ac309efcc8
commit
16dc13e4df
|
@ -140,19 +140,14 @@ public class DNSHelper {
|
||||||
}
|
}
|
||||||
ArrayList<Bundle> values = new ArrayList<>();
|
ArrayList<Bundle> values = new ArrayList<>();
|
||||||
for (SRV srv : result) {
|
for (SRV srv : result) {
|
||||||
boolean added = false;
|
|
||||||
if (ips6.containsKey(srv.getName())) {
|
if (ips6.containsKey(srv.getName())) {
|
||||||
values.add(createNamePortBundle(srv.getName(),srv.getPort(),ips6));
|
values.add(createNamePortBundle(srv.getName(),srv.getPort(),ips6));
|
||||||
added = true;
|
|
||||||
}
|
}
|
||||||
if (ips4.containsKey(srv.getName())) {
|
if (ips4.containsKey(srv.getName())) {
|
||||||
values.add(createNamePortBundle(srv.getName(),srv.getPort(),ips4));
|
values.add(createNamePortBundle(srv.getName(),srv.getPort(),ips4));
|
||||||
added = true;
|
|
||||||
}
|
}
|
||||||
if (!added) {
|
|
||||||
values.add(createNamePortBundle(srv.getName(),srv.getPort(),null));
|
values.add(createNamePortBundle(srv.getName(),srv.getPort(),null));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
bundle.putParcelableArrayList("values", values);
|
bundle.putParcelableArrayList("values", values);
|
||||||
} catch (SocketTimeoutException e) {
|
} catch (SocketTimeoutException e) {
|
||||||
bundle.putString("error", "timeout");
|
bundle.putString("error", "timeout");
|
||||||
|
|
Loading…
Reference in New Issue