|
|
@ -116,6 +116,7 @@ namespace tunnel |
|
|
|
if (!isFollowOnFragment) // create new incomlete message
|
|
|
|
if (!isFollowOnFragment) // create new incomlete message
|
|
|
|
{ |
|
|
|
{ |
|
|
|
m.nextFragmentNum = 1; |
|
|
|
m.nextFragmentNum = 1; |
|
|
|
|
|
|
|
m.receiveTime = i2p::util::GetMillisecondsSinceEpoch (); |
|
|
|
auto ret = m_IncompleteMessages.insert (std::pair<uint32_t, TunnelMessageBlockEx>(msgID, m)); |
|
|
|
auto ret = m_IncompleteMessages.insert (std::pair<uint32_t, TunnelMessageBlockEx>(msgID, m)); |
|
|
|
if (ret.second) |
|
|
|
if (ret.second) |
|
|
|
HandleOutOfSequenceFragments (msgID, ret.first->second); |
|
|
|
HandleOutOfSequenceFragments (msgID, ret.first->second); |
|
|
@ -284,6 +285,14 @@ namespace tunnel |
|
|
|
else |
|
|
|
else |
|
|
|
++it; |
|
|
|
++it; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// incomplete messages
|
|
|
|
|
|
|
|
for (auto it = m_IncompleteMessages.begin (); it != m_IncompleteMessages.end ();) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (ts > it->second.receiveTime + i2p::I2NP_MESSAGE_EXPIRATION_TIMEOUT) |
|
|
|
|
|
|
|
it = m_IncompleteMessages.erase (it); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
++it; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|