From 5025b4a5ed51ea47d9e72b5f3d995b58257bf3d4 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Thu, 29 Sep 2016 22:15:53 +0200 Subject: [PATCH] NodeList set the sessionUUID before emitting the connectedToDomain signal --- libraries/networking/src/NodeList.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 593a79b311..f3934a51f9 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -536,8 +536,13 @@ void NodeList::processDomainServerList(QSharedPointer message) QUuid domainUUID; packetStream >> domainUUID; + // pull our owner UUID from the packet, it's always the first thing + QUuid newUUID; + packetStream >> newUUID; + // if this was the first domain-server list from this domain, we've now connected if (!_domainHandler.isConnected()) { + setSessionUUID(newUUID); _domainHandler.setUUID(domainUUID); _domainHandler.setIsConnected(true); @@ -548,13 +553,10 @@ void NodeList::processDomainServerList(QSharedPointer message) // Recieved packet from different domain. qWarning() << "IGNORING DomainList packet from" << domainUUID << "while connected to" << _domainHandler.getUUID(); return; + } else { + setSessionUUID(newUUID); } - // pull our owner UUID from the packet, it's always the first thing - QUuid newUUID; - packetStream >> newUUID; - setSessionUUID(newUUID); - // pull the permissions/right/privileges for this node out of the stream NodePermissions newPermissions; packetStream >> newPermissions;