mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
pass I2NP message to transport session as shared_ptr
This commit is contained in:
parent
d65257c7b0
commit
3a63f6775a
9 changed files with 47 additions and 75 deletions
|
@ -255,11 +255,17 @@ namespace transport
|
|||
}
|
||||
}
|
||||
if (!it->second.sessions.empty ())
|
||||
it->second.sessions.front ()->SendI2NPMessages (msgs);
|
||||
{
|
||||
// TODO: remove this copy operation later
|
||||
std::vector<std::shared_ptr<i2p::I2NPMessage> > msgs1;
|
||||
for (auto it1: msgs)
|
||||
msgs1.push_back (ToSharedI2NPMessage(it1));
|
||||
it->second.sessions.front ()->SendI2NPMessages (msgs1);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto it1: msgs)
|
||||
it->second.delayedMessages.push_back (it1);
|
||||
it->second.delayedMessages.push_back (ToSharedI2NPMessage(it1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue