mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-09 15:50:26 +03:00
correct endianess in SendQuickAck
This commit is contained in:
parent
50d297fa29
commit
a65dd218da
@ -886,12 +886,12 @@ namespace stream
|
||||
if (!choking)
|
||||
requestImmediateAck = m_LastSendTime && ts > m_LastSendTime + REQUEST_IMMEDIATE_ACK_INTERVAL &&
|
||||
ts > m_LastSendTime + REQUEST_IMMEDIATE_ACK_INTERVAL + m_LocalDestination.GetRandom () % REQUEST_IMMEDIATE_ACK_INTERVAL_VARIANCE;
|
||||
htobuf16 (packet + size, (choking || requestImmediateAck) ? PACKET_FLAG_DELAY_REQUESTED : 0); // no flags set or delay requested
|
||||
htobe16buf (packet + size, (choking || requestImmediateAck) ? PACKET_FLAG_DELAY_REQUESTED : 0); // no flags set or delay requested
|
||||
size += 2; // flags
|
||||
if (choking || requestImmediateAck)
|
||||
{
|
||||
htobuf16 (packet + size, 2); // 2 bytes delay interval
|
||||
htobuf16 (packet + size + 2, choking ? DELAY_CHOKING : 0); // set choking or immediated ack interval
|
||||
htobe16buf (packet + size, 2); // 2 bytes delay interval
|
||||
htobe16buf (packet + size + 2, choking ? DELAY_CHOKING : 0); // set choking or immediated ack interval
|
||||
size += 2;
|
||||
if (requestImmediateAck) m_LastSendTime = ts; // ack request sent
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user