NodeList set the sessionUUID before emitting the connectedToDomain signal

This commit is contained in:
Thijs Wenker 2016-09-29 22:15:53 +02:00
parent 7e3073e163
commit 5025b4a5ed

View file

@ -536,8 +536,13 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
QUuid domainUUID; QUuid domainUUID;
packetStream >> 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 this was the first domain-server list from this domain, we've now connected
if (!_domainHandler.isConnected()) { if (!_domainHandler.isConnected()) {
setSessionUUID(newUUID);
_domainHandler.setUUID(domainUUID); _domainHandler.setUUID(domainUUID);
_domainHandler.setIsConnected(true); _domainHandler.setIsConnected(true);
@ -548,13 +553,10 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
// Recieved packet from different domain. // Recieved packet from different domain.
qWarning() << "IGNORING DomainList packet from" << domainUUID << "while connected to" << _domainHandler.getUUID(); qWarning() << "IGNORING DomainList packet from" << domainUUID << "while connected to" << _domainHandler.getUUID();
return; 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 // pull the permissions/right/privileges for this node out of the stream
NodePermissions newPermissions; NodePermissions newPermissions;
packetStream >> newPermissions; packetStream >> newPermissions;