activate public socket if a node sends data to VS and AM

This commit is contained in:
Stephen Birarda 2013-10-31 13:55:26 -07:00
parent 6a20490e4f
commit 9e3de05e97
2 changed files with 12 additions and 0 deletions

View file

@ -326,6 +326,12 @@ void AudioMixer::run() {
if (matchingNode) {
nodeList->updateNodeWithData(matchingNode, nodeAddress, packetData, receivedBytes);
if (!matchingNode->getActiveSocket()) {
// we don't have an active socket for this node, but they're talking to us
// this means they've heard from us and can reply, let's assume public is active
matchingNode->activatePublicSocket();
}
}
} else {
// let processNodeData handle it.

View file

@ -460,6 +460,12 @@ void VoxelServer::run() {
if (node) {
nodeList->updateNodeWithData(node, &senderAddress, packetData, packetLength);
if (!node->getActiveSocket()) {
// we don't have an active socket for this node, but they're talking to us
// this means they've heard from us and can reply, let's assume public is active
node->activatePublicSocket();
}
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
if (nodeData && !nodeData->isVoxelSendThreadInitalized()) {
nodeData->initializeVoxelSendThread(this);