Merge pull request #1161 from birarda/assignment

activate public socket for nodes who send data
This commit is contained in:
ZappoMan 2013-10-31 14:08:42 -07:00
commit cfbb63f9e8
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);