From 3f4245d5970cea19446a1a68513f8d6f5f3cc283 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 16 Sep 2013 16:19:24 -0700 Subject: [PATCH] fix local mode option --- libraries/voxel-server-library/src/VoxelServer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libraries/voxel-server-library/src/VoxelServer.cpp b/libraries/voxel-server-library/src/VoxelServer.cpp index c4f3d77dd9..e865037082 100644 --- a/libraries/voxel-server-library/src/VoxelServer.cpp +++ b/libraries/voxel-server-library/src/VoxelServer.cpp @@ -142,16 +142,17 @@ void VoxelServer::run() { NodeList* nodeList = NodeList::createInstance(NODE_TYPE_VOXEL_SERVER, listenPort); setvbuf(stdout, NULL, _IOLBF, 0); - + // tell our NodeList about our desire to get notifications nodeList->addHook(&nodeWatcher); + nodeList->linkedDataCreateCallback = &attachVoxelNodeDataToNode; // Handle Local Domain testing with the --local command line const char* local = "--local"; - ::wantLocalDomain = getCmdOption(_argc, _argv,local); + ::wantLocalDomain = cmdOptionExists(_argc, _argv, local); if (::wantLocalDomain) { printf("Local Domain MODE!\n"); - nodeList->setDomainIPToLocalhost(); + NodeList::getInstance()->setDomainIPToLocalhost(); } else { const char* domainIP = getCmdOption(_argc, _argv, "--domain"); if (domainIP) { @@ -159,9 +160,7 @@ void VoxelServer::run() { } } - nodeList->linkedDataCreateCallback = &attachVoxelNodeDataToNode; nodeList->startSilentNodeRemovalThread(); - srand((unsigned)time(0)); const char* DISPLAY_VOXEL_STATS = "--displayVoxelStats";