mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
remove the DomainServer singleton instance from DS
This commit is contained in:
parent
1900d3a13b
commit
ffb628edfb
2 changed files with 3 additions and 15 deletions
|
@ -28,8 +28,6 @@ void signalhandler(int sig){
|
|||
}
|
||||
}
|
||||
|
||||
DomainServer* DomainServer::domainServerInstance = NULL;
|
||||
|
||||
const quint16 DOMAIN_SERVER_HTTP_PORT = 8080;
|
||||
|
||||
DomainServer::DomainServer(int argc, char* argv[]) :
|
||||
|
@ -43,8 +41,6 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
|||
_metavoxelServerConfig(NULL),
|
||||
_hasCompletedRestartHold(false)
|
||||
{
|
||||
DomainServer::setDomainServerInstance(this);
|
||||
|
||||
signal(SIGINT, signalhandler);
|
||||
|
||||
const char CUSTOM_PORT_OPTION[] = "-p";
|
||||
|
@ -253,10 +249,6 @@ void DomainServer::readAvailableDatagrams() {
|
|||
}
|
||||
}
|
||||
|
||||
void DomainServer::setDomainServerInstance(DomainServer* domainServer) {
|
||||
domainServerInstance = domainServer;
|
||||
}
|
||||
|
||||
QJsonObject jsonForSocket(const HifiSockAddr& socket) {
|
||||
QJsonObject socketJSON;
|
||||
|
||||
|
@ -322,9 +314,9 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QString&
|
|||
QJsonObject queuedAssignmentsJSON;
|
||||
|
||||
// add the queued but unfilled assignments to the json
|
||||
std::deque<Assignment*>::iterator assignment = domainServerInstance->_assignmentQueue.begin();
|
||||
std::deque<Assignment*>::iterator assignment = _assignmentQueue.begin();
|
||||
|
||||
while (assignment != domainServerInstance->_assignmentQueue.end()) {
|
||||
while (assignment != _assignmentQueue.end()) {
|
||||
QJsonObject queuedAssignmentJSON;
|
||||
|
||||
QString uuidString = uuidStringWithoutCurlyBraces((*assignment)->getUUID());
|
||||
|
|
|
@ -29,16 +29,12 @@ public:
|
|||
bool handleHTTPRequest(HTTPConnection* connection, const QString& path);
|
||||
|
||||
void exit(int retCode = 0);
|
||||
|
||||
static void setDomainServerInstance(DomainServer* domainServer);
|
||||
|
||||
public slots:
|
||||
/// Called by NodeList to inform us that a node has been killed.
|
||||
void nodeKilled(SharedNodePointer node);
|
||||
|
||||
private:
|
||||
static DomainServer* domainServerInstance;
|
||||
|
||||
private:
|
||||
void prepopulateStaticAssignmentFile();
|
||||
Assignment* matchingStaticAssignmentForCheckIn(const QUuid& checkInUUID, NODE_TYPE nodeType);
|
||||
Assignment* deployableAssignmentForRequest(Assignment& requestAssignment);
|
||||
|
|
Loading…
Reference in a new issue