diff options
Diffstat (limited to 'src/client/net/serverdiscovery.cpp')
-rw-r--r-- | src/client/net/serverdiscovery.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/net/serverdiscovery.cpp b/src/client/net/serverdiscovery.cpp index 2cd0796..0062561 100644 --- a/src/client/net/serverdiscovery.cpp +++ b/src/client/net/serverdiscovery.cpp @@ -47,10 +47,10 @@ ServerDiscovery::~ServerDiscovery() */ void ServerDiscovery::start(const QByteArray& sessionName, QString mgrIP) { - if (mgrIP != NULL) { + if (!mgrIP.isEmpty()) { _mgrIP.setAddress(mgrIP); } else { - _mgrIP = NULL; + _mgrIP = QHostAddress::Null; } //assert(!this->isActive()); @@ -176,7 +176,7 @@ void ServerDiscovery::onUdpReadyRead() } // If so, check if the submitted hash seems valid - if (genSha1(&_nameBytes, &_salt2, &iplist, &port, &cert) != hash) + if (genSha1(&_nameBytes, &_salt2, &iplist, &port, &cert) != hash && _mgrIP != addr) { // did not match local session name, or other data was spoofed ++_hashErrorCount; |