mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Merge branch 'atp' of https://github.com/birarda/hifi into protocol
This commit is contained in:
commit
99fcb08fd1
2 changed files with 5 additions and 3 deletions
|
@ -156,13 +156,13 @@ bool BasePacket::reset() {
|
|||
}
|
||||
|
||||
qint64 BasePacket::writeData(const char* data, qint64 maxSize) {
|
||||
|
||||
Q_ASSERT_X(maxSize <= bytesAvailableForWrite(), "BasePacket::writeData", "not enough space for write");
|
||||
|
||||
// make sure we have the space required to write this block
|
||||
if (maxSize <= bytesAvailableForWrite()) {
|
||||
qint64 currentPos = pos();
|
||||
|
||||
Q_ASSERT(currentPos < _payloadCapacity);
|
||||
|
||||
|
||||
// good to go - write the data
|
||||
memcpy(_payloadStart + currentPos, data, maxSize);
|
||||
|
||||
|
|
|
@ -286,6 +286,8 @@ bool Connection::processReceivedSequenceNumber(SequenceNumber sequenceNumber, in
|
|||
}
|
||||
_receiveWindow.onPacketArrival();
|
||||
|
||||
_receiveWindow.onPacketArrival();
|
||||
|
||||
// If this is not the next sequence number, report loss
|
||||
if (sequenceNumber > _lastReceivedSequenceNumber + 1) {
|
||||
if (_lastReceivedSequenceNumber + 1 == sequenceNumber - 1) {
|
||||
|
|
Loading…
Reference in a new issue