Rework active address to not be based on reachability and allow for a manual address

This commit is contained in:
Cameron Gutman
2018-10-27 01:39:43 -07:00
parent c9cf485025
commit 514e0ca2c9
3 changed files with 35 additions and 27 deletions
@@ -215,18 +215,10 @@ public class NvHTTP {
details.uuid = UUID.fromString(getXmlString(serverInfo, "uniqueid"));
details.macAddress = getXmlString(serverInfo, "mac");
// If there's no LocalIP field, use the address we hit the server on
details.localAddress = getXmlString(serverInfo, "LocalIP");
if (details.localAddress == null) {
details.localAddress = address;
}
// If there's no ExternalIP field, use the address we hit the server on
// This may be null, but that's okay
details.remoteAddress = getXmlString(serverInfo, "ExternalIP");
if (details.remoteAddress == null) {
details.remoteAddress = address;
}
try {
details.pairState = Integer.parseInt(getXmlString(serverInfo, "PairStatus")) == 1 ?