Ensure the PC that responded is the one we're querying

This commit is contained in:
Cameron Gutman 2018-06-26 19:15:28 -07:00
parent bb95c4db78
commit 8ce2b410d2

View file

@ -57,6 +57,12 @@ class PcMonitorThread : public QThread
return false;
}
// Ensure the machine that responded is the one we intended to contact
if (!m_Computer->uuid.isNull() && m_Computer->uuid != http.getXmlString(serverInfo, "uniqueid")) {
qInfo() << "Found unexpected PC at address " << address;
return false;
}
changed = false;
QString newName = http.getXmlString(serverInfo, "hostname");