1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-27 00:44:20 +00:00

increment outgoing sequence number

This commit is contained in:
orignal 2014-04-14 16:24:57 -04:00
parent 022c649617
commit 002b023b29

View File

@ -160,7 +160,7 @@ namespace stream
size += 4; // sendStreamID
*(uint32_t *)(packet + size) = htobe32 (m_RecvStreamID);
size += 4; // receiveStreamID
*(uint32_t *)(packet + size) = htobe32 (m_SequenceNumber);
*(uint32_t *)(packet + size) = htobe32 (m_SequenceNumber++);
size += 4; // sequenceNum
*(uint32_t *)(packet + size) = 0; // TODO
size += 4; // ack Through
@ -224,7 +224,7 @@ namespace stream
size += 4; // sendStreamID
*(uint32_t *)(packet + size) = htobe32 (m_RecvStreamID);
size += 4; // receiveStreamID
*(uint32_t *)(packet + size) = htobe32 (m_SequenceNumber);
*(uint32_t *)(packet + size) = htobe32 (m_SequenceNumber++);
size += 4; // sequenceNum
*(uint32_t *)(packet + size) = htobe32 (m_LastReceivedSequenceNumber);
size += 4; // ack Through
@ -286,7 +286,7 @@ namespace stream
}
I2NPMessage * msg = i2p::garlic::routing.WrapMessage (m_RemoteLeaseSet,
CreateDataMessage (this, buf, len), leaseSet);
if (!m_OutboundTunnel)
if (!m_OutboundTunnel || m_OutboundTunnel->IsFailed ())
m_OutboundTunnel = m_LocalDestination->GetTunnelPool ()->GetNextOutboundTunnel ();
if (m_OutboundTunnel)
{