Merge pull request #2749 from AenBleidd/fix_local_address_list

[Manager] Fix an issue when 127.0.0.1 was not recognized as local add…
This commit is contained in:
Juha Sointusalo 2018-10-14 00:24:19 +03:00 committed by GitHub
commit 98063ce0e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 7 deletions

View File

@ -265,15 +265,26 @@ bool CNetworkConnection::IsComputerNameLocal(const wxString& strMachine) {
if (strMachine.empty()) {
return true;
} else if (wxT("localhost") == strMachine.Lower()) {
return true;
} else if (wxT("localhost.localdomain") == strMachine.Lower()) {
return true;
} else if (strHostName == strMachine.Lower()) {
return true;
} else if (strFullHostName == strMachine.Lower()) {
}
const wxString& strMachineLower = strMachine.Lower();
if (wxT("localhost") == strMachineLower) {
return true;
}
if (wxT("localhost.localdomain") == strMachineLower) {
return true;
}
if (strHostName == strMachineLower) {
return true;
}
if (strFullHostName == strMachineLower) {
return true;
}
if (wxT("127.0.0.1") == strMachineLower) {
return true;
}
return false;
}