mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-13 00:25:27 +02:00
Merge fixes
This commit is contained in:
parent
bfb9166b8e
commit
02e1eaf452
4 changed files with 3 additions and 17 deletions
|
@ -208,20 +208,6 @@ bool LimitedNodeList::packetSourceAndHashMatch(const NLPacket& packet, SharedNod
|
|||
return false;
|
||||
}
|
||||
|
||||
qint64 LimitedNodeList::readDatagram(QByteArray& incomingPacket, QHostAddress* address = 0, quint16* port = 0) {
|
||||
qint64 result = getNodeSocket().readDatagram(incomingPacket.data(), incomingPacket.size(), address, port);
|
||||
|
||||
SharedNodePointer sendingNode = sendingNodeForPacket(incomingPacket);
|
||||
if (sendingNode) {
|
||||
emit dataReceived(sendingNode->getType(), incomingPacket.size());
|
||||
} else {
|
||||
emit dataReceived(NodeType::Unassigned, incomingPacket.size());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
qint64 LimitedNodeList::writeDatagram(const NLPacket& packet, const HifiSockAddr& destinationSockAddr) {
|
||||
return writeDatagram({packet.getData(), static_cast<int>(packet.getSizeWithHeader())}, destinationSockAddr);
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ void NodeList::processPingPacket(QSharedPointer<NLPacket> packet, SharedNodePoin
|
|||
// send back a reply
|
||||
auto replyPacket = constructPingReplyPacket(*packet);
|
||||
const HifiSockAddr& senderSockAddr = packet->getSenderSockAddr();
|
||||
sendPacket(std::move(replyPacket), sendingNode, senderSockAddr);
|
||||
sendPacket(std::move(replyPacket), *sendingNode, senderSockAddr);
|
||||
|
||||
// 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.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <QtCore/QSet>
|
||||
|
||||
#include "NLPacket.h"
|
||||
#include "PacketHeaders.h"
|
||||
#include "udt/PacketHeaders.h"
|
||||
|
||||
class PacketListener;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <QIODevice>
|
||||
|
||||
#include "HifiSockAddr.h"
|
||||
#include "../HifiSockAddr.h"
|
||||
#include "PacketHeaders.h"
|
||||
|
||||
class Packet : public QIODevice {
|
||||
|
|
Loading…
Reference in a new issue