eliminated else, this might look cleaner

This commit is contained in:
Thijs Wenker 2016-09-30 03:31:35 +02:00
parent 5025b4a5ed
commit 4f7fdfc345

View file

@ -536,25 +536,25 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
QUuid domainUUID;
packetStream >> domainUUID;
if (_domainHandler.isConnected() && _domainHandler.getUUID() != domainUUID) {
// Recieved packet from different domain.
qWarning() << "IGNORING DomainList packet from" << domainUUID << "while connected to" << _domainHandler.getUUID();
return;
}
// pull our owner UUID from the packet, it's always the first thing
QUuid newUUID;
packetStream >> newUUID;
setSessionUUID(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);
// in case we didn't use a place name to get to this domain,
// give the address manager a chance to lookup a default one now
DependencyManager::get<AddressManager>()->lookupShareableNameForDomainID(domainUUID);
} else if (_domainHandler.getUUID() != domainUUID) {
// Recieved packet from different domain.
qWarning() << "IGNORING DomainList packet from" << domainUUID << "while connected to" << _domainHandler.getUUID();
return;
} else {
setSessionUUID(newUUID);
}
// pull the permissions/right/privileges for this node out of the stream