Merge remote-tracking branch 'huffman/atp' into atp

This commit is contained in:
Stephen Birarda 2015-07-07 16:27:18 -07:00
commit 2a69a89696
7 changed files with 18 additions and 18 deletions

View file

@ -196,7 +196,7 @@ void AssignmentClientMonitor::checkSpares() {
childNode->activateLocalSocket(); childNode->activateLocalSocket();
auto diePacket = NLPacket::create(PacketType::StopNode, 0); auto diePacket = NLPacket::create(PacketType::StopNode, 0);
nodeList->sendPacket(diePacket, childNode); nodeList->sendPacket(std::move(diePacket), childNode);
} }
} }
} }
@ -231,7 +231,7 @@ void AssignmentClientMonitor::readPendingDatagrams() {
qDebug() << "asking unknown child to exit."; qDebug() << "asking unknown child to exit.";
auto diePacket = NL::create(PacketType::StopNode, 0); auto diePacket = NL::create(PacketType::StopNode, 0);
nodeList->sendPacket(diePacket, childNode); nodeList->sendPacket(std::move(diePacket), childNode);
} }
} }
} }

View file

@ -530,7 +530,7 @@ void AudioMixer::sendAudioEnvironmentPacket(SharedNodePointer node) {
envPacket.write(&reverbTime, sizeof(reverb)); envPacket.write(&reverbTime, sizeof(reverb));
envPacket.write(&wetLevel, sizeof(wetLevel)); envPacket.write(&wetLevel, sizeof(wetLevel));
} }
nodeList->sendPacket(envPacket, node); nodeList->sendPacket(std::move(envPacket), node);
} }
} }
@ -794,7 +794,7 @@ void AudioMixer::run() {
if (nodeData->getAvatarAudioStream() if (nodeData->getAvatarAudioStream()
&& shouldMute(nodeData->getAvatarAudioStream()->getQuietestFrameLoudness())) { && shouldMute(nodeData->getAvatarAudioStream()->getQuietestFrameLoudness())) {
auto mutePacket = NLPacket::create(PacketType::NoisyMute, 0); auto mutePacket = NLPacket::create(PacketType::NoisyMute, 0);
nodeList->sendPacket(mutePacket, node); nodeList->sendPacket(std::move(mutePacket), node);
} }
if (node->getType() == NodeType::Agent && node->getActiveSocket() if (node->getType() == NodeType::Agent && node->getActiveSocket()

View file

@ -190,7 +190,7 @@ void AudioMixerClientData::sendAudioStreamStatsPackets(const SharedNodePointer&
numStreamStatsRemaining -= numStreamStatsToPack; numStreamStatsRemaining -= numStreamStatsToPack;
// send the current packet // send the current packet
nodeList->sendPacket(statsPacket, destinationNode); nodeList->sendPacket(std::move(statsPacket), destinationNode);
} }
} }

View file

@ -309,7 +309,7 @@ void AvatarMixer::broadcastAvatarData() {
billboardPacket->write(otherNode->getUUID().toRfc4122()); billboardPacket->write(otherNode->getUUID().toRfc4122());
billboardPacket->write(otherNodeData->getAvatar().getBillboard()); billboardPacket->write(otherNodeData->getAvatar().getBillboard());
nodeList->sendPacket(billboardPacket, node); nodeList->sendPacket(std::move(billboardPacket), node);
++_sumBillboardPackets; ++_sumBillboardPackets;
} }
@ -326,7 +326,7 @@ void AvatarMixer::broadcastAvatarData() {
identityPacket->write(individualData); identityPacket->write(individualData);
nodeList->sendPacket(identityPacket, node); nodeList->sendPacket(std::move(identityPacket), node);
++_sumIdentityPackets; ++_sumIdentityPackets;
} }

View file

@ -1324,10 +1324,10 @@ void DomainServer::pingPunchForConnectingPeer(const SharedNetworkPeer& peer) {
// send the ping packet to the local and public sockets for this node // send the ping packet to the local and public sockets for this node
auto localPingPacket = nodeList->constructICEPingPacket(PingType::Local, limitedNodeList->getSessionUUID()); auto localPingPacket = nodeList->constructICEPingPacket(PingType::Local, limitedNodeList->getSessionUUID());
limitedNodeList->sendPacket(localPingPacket, peer->getLocalSocket()); limitedNodeList->sendPacket(std::move(localPingPacket), peer->getLocalSocket());
auto publicPingPacket = nodeList->constructICEPingPacket(PingType::Public, limitedNodeList->getSessionUUID()); auto publicPingPacket = nodeList->constructICEPingPacket(PingType::Public, limitedNodeList->getSessionUUID());
limitedNodeList->sendPacket(publicPingPacket, peer->getPublicSocket()); limitedNodeList->sendPacket(std::move(publicPingPacket), peer->getPublicSocket());
peer->incrementConnectionAttempts(); peer->incrementConnectionAttempts();
} }

View file

@ -124,5 +124,5 @@ void AudioIOStats::sendDownstreamAudioStatsPacket() {
// send packet // send packet
SharedNodePointer audioMixer = nodeList->soloNodeOfType(NodeType::AudioMixer); SharedNodePointer audioMixer = nodeList->soloNodeOfType(NodeType::AudioMixer);
nodeList->sendPacket(statsPacket, audioMixer); nodeList->sendPacket(std::move(statsPacket), audioMixer);
} }

View file

@ -204,7 +204,7 @@ void NodeList::processNodeData(const HifiSockAddr& senderSockAddr, const QByteAr
if (matchingNode) { if (matchingNode) {
matchingNode->setLastHeardMicrostamp(usecTimestampNow()); matchingNode->setLastHeardMicrostamp(usecTimestampNow());
auto replyPacket = constructPingReplyPacket(packet); auto replyPacket = constructPingReplyPacket(packet);
sendPacket(replyPacket, matchingNode, senderSockAddr); sendPacket(std::move(replyPacket), matchingNode, senderSockAddr);
// If we don't have a symmetric socket for this node and this socket doesn't match // If we don't have a symmetric socket for this node and this socket doesn't match
// what we have for public and local then set it as the symmetric. // what we have for public and local then set it as the symmetric.
@ -236,7 +236,7 @@ void NodeList::processNodeData(const HifiSockAddr& senderSockAddr, const QByteAr
case PacketType::ICEPing: { case PacketType::ICEPing: {
// send back a reply // send back a reply
auto replyPacket = constructICEPingReplyPacket(packet, _domainHandler.getICEClientID()); auto replyPacket = constructICEPingReplyPacket(packet, _domainHandler.getICEClientID());
sendPacket(replyPacket, senderSockAddr); sendPacket(std::move(replyPacket), senderSockAddr);
break; break;
} }
case PacketType::ICEPingReply: { case PacketType::ICEPingReply: {
@ -369,7 +369,7 @@ void NodeList::sendDomainServerCheckIn() {
flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendDSCheckIn); flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendDSCheckIn);
if (!isUsingDTLS) { if (!isUsingDTLS) {
sendPacket(domainPacket, _domainHandler.getSockAddr()); sendPacket(std::move(domainPacket), _domainHandler.getSockAddr());
} }
if (_numNoReplyDomainCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) { if (_numNoReplyDomainCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
@ -431,7 +431,7 @@ void NodeList::sendDSPathQuery(const QString& newPath) {
<< _domainHandler.getSockAddr(); << _domainHandler.getSockAddr();
// send off the path query // send off the path query
sendPacket(pathQueryPacket, _domainHandler.getSockAddr()); sendPacket(std::move(pathQueryPacket), _domainHandler.getSockAddr());
} else { } else {
qCDebug(networking) << "Path" << newPath << "would make PacketTypeDomainServerPathQuery packet > MAX_PACKET_SIZE." << qCDebug(networking) << "Path" << newPath << "would make PacketTypeDomainServerPathQuery packet > MAX_PACKET_SIZE." <<
"Will not send query."; "Will not send query.";
@ -521,10 +521,10 @@ void NodeList::pingPunchForDomainServer() {
// send the ping packet to the local and public sockets for this node // send the ping packet to the local and public sockets for this node
auto localPingPacket = constructICEPingPacket(PingType::Local); auto localPingPacket = constructICEPingPacket(PingType::Local);
sendPacket(localPingPacket, _domainHandler.getICEPeer().getLocalSocket()); sendPacket(std::move(localPingPacket), _domainHandler.getICEPeer().getLocalSocket());
auto publicPingPacket = constructICEPingPacket(PingType::Public); auto publicPingPacket = constructICEPingPacket(PingType::Public);
sendPacket(publicPingPacket, _domainHandler.getICEPeer().getPublicSocket()); sendPacket(std::move(publicPingPacket), _domainHandler.getICEPeer().getPublicSocket());
_domainHandler.getICEPeer().incrementConnectionAttempts(); _domainHandler.getICEPeer().incrementConnectionAttempts();
} }
@ -629,10 +629,10 @@ void NodeList::pingPunchForInactiveNode(const SharedNodePointer& node) {
// send the ping packet to the local and public sockets for this node // send the ping packet to the local and public sockets for this node
auto localPingPacket = constructPingPacket(PingType::Local); auto localPingPacket = constructPingPacket(PingType::Local);
sendPacket(localPingPacket, node, node->getLocalSocket()); sendPacket(std::move(localPingPacket), node, node->getLocalSocket());
auto publicPingPacket = constructPingPacket(PingType::Public); auto publicPingPacket = constructPingPacket(PingType::Public);
sendPacket(publicPingPacket, node, node->getPublicSocket()); sendPacket(std::move(publicPingPacket), node, node->getPublicSocket());
if (!node->getSymmetricSocket().isNull()) { if (!node->getSymmetricSocket().isNull()) {
auto symmetricPingPacket = constructPingPacket(PingType::Symmetric); auto symmetricPingPacket = constructPingPacket(PingType::Symmetric);