mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
Merge pull request #51 from huffman/tiemstamp-on-receive-packet-from-packetlist
Move lastHeardMicroStamp to be updated when filtering packets
This commit is contained in:
commit
6e7db4e816
2 changed files with 4 additions and 12 deletions
|
@ -234,6 +234,10 @@ bool LimitedNodeList::packetSourceAndHashMatch(const udt::Packet& packet) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No matter if this packet is handled or not, we update the timestamp for the last time we heard
|
||||||
|
// from this sending node
|
||||||
|
matchingNode->setLastHeardMicrostamp(usecTimestampNow());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -258,12 +258,6 @@ void PacketReceiver::handleVerifiedPacketList(std::unique_ptr<udt::PacketList> p
|
||||||
|
|
||||||
if (!nlPacketList->getSourceID().isNull()) {
|
if (!nlPacketList->getSourceID().isNull()) {
|
||||||
matchingNode = nodeList->nodeWithUUID(nlPacketList->getSourceID());
|
matchingNode = nodeList->nodeWithUUID(nlPacketList->getSourceID());
|
||||||
|
|
||||||
if (matchingNode) {
|
|
||||||
// No matter if this packet is handled or not, we update the timestamp for the last time we heard
|
|
||||||
// from this sending node
|
|
||||||
matchingNode->setLastHeardMicrostamp(usecTimestampNow());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMutexLocker packetListenerLocker(&_packetListenerLock);
|
QMutexLocker packetListenerLocker(&_packetListenerLock);
|
||||||
|
@ -384,12 +378,6 @@ void PacketReceiver::handleVerifiedPacket(std::unique_ptr<udt::Packet> packet) {
|
||||||
|
|
||||||
if (!nlPacket->getSourceID().isNull()) {
|
if (!nlPacket->getSourceID().isNull()) {
|
||||||
matchingNode = nodeList->nodeWithUUID(nlPacket->getSourceID());
|
matchingNode = nodeList->nodeWithUUID(nlPacket->getSourceID());
|
||||||
|
|
||||||
if (matchingNode) {
|
|
||||||
// No matter if this packet is handled or not, we update the timestamp for the last time we heard
|
|
||||||
// from this sending node
|
|
||||||
matchingNode->setLastHeardMicrostamp(usecTimestampNow());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMutexLocker packetListenerLocker(&_packetListenerLock);
|
QMutexLocker packetListenerLocker(&_packetListenerLock);
|
||||||
|
|
Loading…
Reference in a new issue