mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:29:01 +02:00
allow domain to pass down its ID from config
This commit is contained in:
parent
c9ed83ac14
commit
ee6a90dd54
2 changed files with 10 additions and 1 deletions
|
@ -189,6 +189,12 @@ void DomainServer::setupNodeListAndAssignments(const QUuid& sessionUUID) {
|
||||||
populateDefaultStaticAssignmentsExcludingTypes(parsedTypes);
|
populateDefaultStaticAssignmentsExcludingTypes(parsedTypes);
|
||||||
|
|
||||||
LimitedNodeList* nodeList = LimitedNodeList::createInstance(domainServerPort, domainServerDTLSPort);
|
LimitedNodeList* nodeList = LimitedNodeList::createInstance(domainServerPort, domainServerDTLSPort);
|
||||||
|
|
||||||
|
const QString DOMAIN_CONFIG_ID_KEY = "id";
|
||||||
|
|
||||||
|
// set our LimitedNodeList UUID to match the UUID from our config
|
||||||
|
// nodes will currently use this to add resources to data-web that relate to our domain
|
||||||
|
nodeList->setSessionUUID(_argumentVariantMap.value(DOMAIN_CONFIG_ID_KEY).toString());
|
||||||
|
|
||||||
connect(nodeList, &LimitedNodeList::nodeAdded, this, &DomainServer::nodeAdded);
|
connect(nodeList, &LimitedNodeList::nodeAdded, this, &DomainServer::nodeAdded);
|
||||||
connect(nodeList, &LimitedNodeList::nodeKilled, this, &DomainServer::nodeKilled);
|
connect(nodeList, &LimitedNodeList::nodeKilled, this, &DomainServer::nodeKilled);
|
||||||
|
|
|
@ -397,7 +397,10 @@ int NodeList::processDomainServerList(const QByteArray& packet) {
|
||||||
_numNoReplyDomainCheckIns = 0;
|
_numNoReplyDomainCheckIns = 0;
|
||||||
|
|
||||||
// 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
|
||||||
_domainHandler.setIsConnected(true);
|
if (!_domainHandler.isConnected()) {
|
||||||
|
_domainHandler.setUUID(uuidFromPacketHeader(packet));
|
||||||
|
_domainHandler.setIsConnected(true);
|
||||||
|
}
|
||||||
|
|
||||||
int readNodes = 0;
|
int readNodes = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue