summaryrefslogtreecommitdiffstats
path: root/src/client/net/serverdiscovery.cpp
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-09-04 18:10:57 +0200
committerBjörn Hagemeister2014-09-04 18:10:57 +0200
commitde8cae01617b57ebd36a7d3fab3b4875b0da2255 (patch)
tree27a2fbc5db83225fc552000f7ddb5c778c55e920 /src/client/net/serverdiscovery.cpp
parentMerge branch 'master' of git.openslx.org:pvs2 (diff)
downloadpvs2-de8cae01617b57ebd36a7d3fab3b4875b0da2255.tar.gz
pvs2-de8cae01617b57ebd36a7d3fab3b4875b0da2255.tar.xz
pvs2-de8cae01617b57ebd36a7d3fab3b4875b0da2255.zip
The sessionID is ignored by manager if client is connecting via auto-connect.
Diffstat (limited to 'src/client/net/serverdiscovery.cpp')
-rw-r--r--src/client/net/serverdiscovery.cpp6
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;