Merge branch 'atp' of github.com:birarda/hifi into receive_packets

Conflicts:
	domain-server/src/DomainServer.cpp
This commit is contained in:
Ryan Huffman 2015-07-14 16:13:54 -07:00
commit d8bec3983f
2 changed files with 11 additions and 20 deletions

View file

@ -726,31 +726,22 @@ void DomainServer::processConnectRequestPacket(QSharedPointer<NLPacket> packet)
}
}
void DomainServer::processListRequestPacket(QSharedPointer<NLPacket> packet) {
void DomainServer::processListRequestPacket(QSharedPointer<NLPacket> packet, SharedNodePointer sendingNode) {
NodeType_t throwawayNodeType;
HifiSockAddr nodePublicAddress, nodeLocalAddress;
QDataStream packetStream(packet.data());
const QUuid& nodeUUID = packet->getSourceID();
parseNodeData(packetStream, throwawayNodeType, nodePublicAddress, nodeLocalAddress, packet->getSenderSockAddr());
auto limitedNodeList = DependencyManager::get<LimitedNodeList>();
sendingNode->setPublicSocket(nodePublicAddress);
sendingNode->setLocalSocket(nodeLocalAddress);
SharedNodePointer checkInNode = limitedNodeList->nodeWithUUID(nodeUUID);
QList<NodeType_t> nodeInterestList;
packetStream >> nodeInterestList;
if (checkInNode) {
NodeType_t throwawayNodeType;
HifiSockAddr nodePublicAddress, nodeLocalAddress;
QDataStream packetStream(packet.data());
parseNodeData(packetStream, throwawayNodeType, nodePublicAddress, nodeLocalAddress, packet->getSenderSockAddr());
checkInNode->setPublicSocket(nodePublicAddress);
checkInNode->setLocalSocket(nodeLocalAddress);
QList<NodeType_t> nodeInterestList;
packetStream >> nodeInterestList;
sendDomainListToNode(checkInNode, packet->getSenderSockAddr(), nodeInterestList.toSet());
}
sendDomainListToNode(sendingNode, packet->getSenderSockAddr(), nodeInterestList.toSet());
}
unsigned int DomainServer::countConnectedUsers() {

View file

@ -58,7 +58,7 @@ public slots:
void processRequestAssignmentPacket(QSharedPointer<NLPacket> packet);
void processConnectRequestPacket(QSharedPointer<NLPacket> packet);
void processListRequestPacket(QSharedPointer<NLPacket> packet);
void processListRequestPacket(QSharedPointer<NLPacket> packet, SharedNodePointer sendingNode);
void processNodeJSONStatsPacket(QSharedPointer<NLPacket> packet, SharedNodePointer sendingNode);
void processPathQueryPacket(QSharedPointer<NLPacket> packet);
void processICEPingPacket(QSharedPointer<NLPacket> packet);