fix memory leak with udp tunnel

This commit is contained in:
Jeff Becker 2016-10-09 10:55:55 -04:00
parent 43c3bdf7c5
commit 577d9ddf65
No known key found for this signature in database
GPG key ID: AB950234D6EA286B
4 changed files with 26 additions and 26 deletions

View file

@ -133,13 +133,14 @@ namespace datagram
std::shared_ptr<I2NPMessage> CreateDataMessage (const uint8_t * payload, size_t len, uint16_t fromPort, uint16_t toPort);
void HandleDatagram (uint16_t fromPort, uint16_t toPort, const uint8_t * buf, size_t len);
void HandleDatagram (uint16_t fromPort, uint16_t toPort, uint8_t *const& buf, size_t len);
/** find a receiver by port, if none by port is found try default receiever, otherwise returns nullptr */
Receiver FindReceiver(uint16_t port);
private:
i2p::client::ClientDestination * m_Owner;
i2p::data::IdentityEx m_Identity;
Receiver m_Receiver; // default
std::mutex m_SessionsMutex;
std::map<i2p::data::IdentHash, std::shared_ptr<DatagramSession> > m_Sessions;