mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-23 07:35:37 +02:00
fixed race condition between local buffer creation and sending it through the transports
This commit is contained in:
parent
7dc5a04b8d
commit
acbd3f897b
8 changed files with 51 additions and 18 deletions
libi2pd
|
@ -114,7 +114,8 @@ namespace garlic
|
|||
return std::shared_ptr<i2p::garlic::GarlicDestination> (this,
|
||||
[](i2p::garlic::GarlicDestination *) {});
|
||||
}
|
||||
|
||||
std::shared_ptr<i2p::data::RouterInfo::Buffer> CopyRouterInfoBuffer () const;
|
||||
|
||||
const uint8_t * GetNTCP2StaticPublicKey () const { return m_NTCP2Keys ? m_NTCP2Keys->staticPublicKey : nullptr; };
|
||||
const uint8_t * GetNTCP2StaticPrivateKey () const { return m_NTCP2Keys ? m_NTCP2Keys->staticPrivateKey : nullptr; };
|
||||
const uint8_t * GetNTCP2IV () const { return m_NTCP2Keys ? m_NTCP2Keys->iv : nullptr; };
|
||||
|
@ -258,6 +259,7 @@ namespace garlic
|
|||
std::unordered_set<i2p::data::IdentHash> m_PublishExcluded;
|
||||
uint32_t m_PublishReplyToken;
|
||||
bool m_IsHiddenMode; // not publish
|
||||
mutable std::mutex m_RouterInfoMutex;
|
||||
};
|
||||
|
||||
extern RouterContext context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue