From a00b95666a619dbdd09bd180c0d913940c3b1463 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Jul 2013 15:49:07 -0700 Subject: [PATCH] don't listen to VS packets not from current VS --- interface/src/Application.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index f9cebf41b4..eb99feca47 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1148,12 +1148,8 @@ void Application::editPreferences() { // check if the domain server hostname is new if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, strlen(newHostname)) != 0) { - // if so we need to clear the nodelist and delete the existing voxel and environment data - Node *voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER); - if (voxelServer) { - voxelServer->lock(); - } + NodeList::getInstance()->clear(); // kill the local voxels _voxels.killLocalVoxels(); @@ -1161,11 +1157,6 @@ void Application::editPreferences() { // reset the environment to default _environment.resetToDefault(); - if (voxelServer) { - voxelServer->unlock(); - } - - NodeList::getInstance()->clear(); NodeList::getInstance()->setDomainHostname(newHostname); } @@ -3356,7 +3347,7 @@ void* Application::networkReceive(void* args) { case PACKET_TYPE_ENVIRONMENT_DATA: { if (app->_renderVoxels->isChecked()) { Node* voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER); - if (voxelServer) { + if (voxelServer && socketMatch(voxelServer->getActiveSocket(), &senderAddress)) { voxelServer->lock(); if (app->_incomingPacket[0] == PACKET_TYPE_ENVIRONMENT_DATA) {