Merge fixes

This commit is contained in:
Atlante45 2015-07-14 17:08:36 -07:00
parent bfb9166b8e
commit 02e1eaf452
4 changed files with 3 additions and 17 deletions

View file

@ -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);
}

View file

@ -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.

View file

@ -20,7 +20,7 @@
#include <QtCore/QSet>
#include "NLPacket.h"
#include "PacketHeaders.h"
#include "udt/PacketHeaders.h"
class PacketListener;

View file

@ -16,7 +16,7 @@
#include <QIODevice>
#include "HifiSockAddr.h"
#include "../HifiSockAddr.h"
#include "PacketHeaders.h"
class Packet : public QIODevice {