From de8cae01617b57ebd36a7d3fab3b4875b0da2255 Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Thu, 4 Sep 2014 18:10:57 +0200 Subject: The sessionID is ignored by manager if client is connecting via auto-connect. --- src/client/net/serverdiscovery.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/net/serverdiscovery.cpp') 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; -- cgit v1.2.3-55-g7522