fix a bug in version mismatched packets

This commit is contained in:
Stephen Birarda 2014-02-10 12:06:08 -08:00
parent 988c98d4d7
commit 37d7872677

View file

@ -80,11 +80,11 @@ NodeList::~NodeList() {
clear();
}
bool NodeList::packetVersionAndHashMatch(const QByteArray& packet) {
bool NodeList::packetVersionAndHashMatch(const QByteArray& packet) {
if (packet[1] != versionForPacketType(packetTypeForPacket(packet))
&& packetTypeForPacket(packet) != PacketTypeStunResponse) {
PacketType mismatchType = packetTypeForPacket(packet);
int numPacketTypeBytes = arithmeticCodingValueFromBuffer(packet.data());
int numPacketTypeBytes = numBytesArithmeticCodingFromBuffer(packet.data());
qDebug() << "Packet version mismatch on" << packetTypeForPacket(packet) << "- Sender"
<< uuidFromPacketHeader(packet) << "sent" << qPrintable(QString::number(packet[numPacketTypeBytes])) << "but"