mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:37:48 +02:00
Set AddressManager before NodeList
This commit is contained in:
parent
1399de52a5
commit
7b5babb02a
2 changed files with 9 additions and 6 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
|
|
||||||
#include <AccountManager.h>
|
#include <AccountManager.h>
|
||||||
|
#include <AddressManager.h>
|
||||||
#include <Assignment.h>
|
#include <Assignment.h>
|
||||||
#include <HifiConfigVariantMap.h>
|
#include <HifiConfigVariantMap.h>
|
||||||
#include <LogHandler.h>
|
#include <LogHandler.h>
|
||||||
|
@ -48,7 +49,12 @@ AssignmentClient::AssignmentClient(int &argc, char **argv) :
|
||||||
setOrganizationDomain("highfidelity.io");
|
setOrganizationDomain("highfidelity.io");
|
||||||
setApplicationName("assignment-client");
|
setApplicationName("assignment-client");
|
||||||
QSettings::setDefaultFormat(QSettings::IniFormat);
|
QSettings::setDefaultFormat(QSettings::IniFormat);
|
||||||
|
|
||||||
|
// create a NodeList as an unassigned client
|
||||||
|
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
||||||
|
auto addressManager = DependencyManager::set<AddressManager>();
|
||||||
|
auto nodeList = DependencyManager::set<NodeList>(NodeType::Unassigned);
|
||||||
|
|
||||||
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
|
// setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
installNativeEventFilter(&ShutdownEventListener::getInstance());
|
installNativeEventFilter(&ShutdownEventListener::getInstance());
|
||||||
|
@ -91,9 +97,6 @@ AssignmentClient::AssignmentClient(int &argc, char **argv) :
|
||||||
qDebug() << "The destination wallet UUID for credits is" << uuidStringWithoutCurlyBraces(walletUUID);
|
qDebug() << "The destination wallet UUID for credits is" << uuidStringWithoutCurlyBraces(walletUUID);
|
||||||
_requestAssignment.setWalletUUID(walletUUID);
|
_requestAssignment.setWalletUUID(walletUUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a NodeList as an unassigned client
|
|
||||||
auto nodeList = DependencyManager::set<NodeList>(NodeType::Unassigned);
|
|
||||||
|
|
||||||
quint16 assignmentServerPort = DEFAULT_DOMAIN_SERVER_PORT;
|
quint16 assignmentServerPort = DEFAULT_DOMAIN_SERVER_PORT;
|
||||||
|
|
||||||
|
|
|
@ -1110,8 +1110,8 @@ void OctreeServer::run() {
|
||||||
|
|
||||||
beforeRun(); // after payload has been processed
|
beforeRun(); // after payload has been processed
|
||||||
|
|
||||||
connect(nodeList, SIGNAL(nodeAdded(SharedNodePointer)), SLOT(nodeAdded(SharedNodePointer)));
|
connect(nodeList.data(), SIGNAL(nodeAdded(SharedNodePointer)), SLOT(nodeAdded(SharedNodePointer)));
|
||||||
connect(nodeList, SIGNAL(nodeKilled(SharedNodePointer)),SLOT(nodeKilled(SharedNodePointer)));
|
connect(nodeList.data(), SIGNAL(nodeKilled(SharedNodePointer)),SLOT(nodeKilled(SharedNodePointer)));
|
||||||
|
|
||||||
|
|
||||||
// we need to ask the DS about agents so we can ping/reply with them
|
// we need to ask the DS about agents so we can ping/reply with them
|
||||||
|
|
Loading…
Reference in a new issue