remove TODO added for DS, check sockets

This commit is contained in:
Stephen Birarda 2015-07-17 14:17:48 -07:00
parent 8a2bb55231
commit 8ff8a17f02

View file

@ -580,8 +580,8 @@ void DomainServer::processConnectRequestPacket(QSharedPointer<NLPacket> packet)
NodeType_t nodeType;
HifiSockAddr publicSockAddr, localSockAddr;
if (packet->getPayloadSize() == 0) {
// TODO: We know what size the connect packet should be (minimally) - check for that here
return;
}
@ -594,6 +594,11 @@ void DomainServer::processConnectRequestPacket(QSharedPointer<NLPacket> packet)
parseNodeData(packetStream, nodeType, publicSockAddr, localSockAddr, senderSockAddr);
if (localSockAddr.isNull() || senderSockAddr.isNull()) {
qDebug() << "Unexpected data received for node local socket or public socket. Will not allow connection.";
return;
}
// check if this connect request matches an assignment in the queue
bool isAssignment = _pendingAssignedNodes.contains(connectUUID);
SharedAssignmentPointer matchingQueuedAssignment = SharedAssignmentPointer();