fix bug in Octree server that wasn't properly surpressing duplicate packets

This commit is contained in:
Brad Hefta-Gaub 2014-01-09 19:13:17 -08:00
parent 5787d3d9e9
commit e908121bcd

View file

@ -49,8 +49,10 @@ bool OctreeQueryNode::packetIsDuplicate() const {
// since our packets now include header information, like sequence number, and createTime, we can't just do a memcmp
// of the entire packet, we need to compare only the packet content...
if (_lastOctreePacketLength == getPacketLength()) {
return memcmp(_lastOctreePacket + OCTREE_PACKET_HEADER_SIZE,
_octreePacket+OCTREE_PACKET_HEADER_SIZE , getPacketLength() - OCTREE_PACKET_HEADER_SIZE == 0);
if (memcmp(_lastOctreePacket + OCTREE_PACKET_HEADER_SIZE,
_octreePacket + OCTREE_PACKET_HEADER_SIZE , getPacketLength() - OCTREE_PACKET_HEADER_SIZE) == 0) {
return true;
}
}
return false;
}