mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
changes
This commit is contained in:
parent
72974c85c8
commit
7b5e18d94b
5 changed files with 25 additions and 36 deletions
|
@ -677,8 +677,6 @@ namespace client
|
|||
|
||||
ClientDestination::~ClientDestination ()
|
||||
{
|
||||
if (m_DatagramDestination)
|
||||
delete m_DatagramDestination;
|
||||
}
|
||||
|
||||
bool ClientDestination::Start ()
|
||||
|
@ -703,13 +701,8 @@ namespace client
|
|||
m_StreamingDestination = nullptr;
|
||||
for (auto& it: m_StreamingDestinationsByPorts)
|
||||
it.second->Stop ();
|
||||
if (m_DatagramDestination)
|
||||
{
|
||||
auto d = m_DatagramDestination;
|
||||
m_DatagramDestination = nullptr;
|
||||
delete d;
|
||||
}
|
||||
return true;
|
||||
m_DatagramDestination = nullptr;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
@ -819,10 +812,10 @@ namespace client
|
|||
return dest;
|
||||
}
|
||||
|
||||
i2p::datagram::DatagramDestination * ClientDestination::CreateDatagramDestination ()
|
||||
std::shared_ptr<i2p::datagram::DatagramDestination> ClientDestination::CreateDatagramDestination ()
|
||||
{
|
||||
if (!m_DatagramDestination)
|
||||
m_DatagramDestination = new i2p::datagram::DatagramDestination (GetSharedFromThis ());
|
||||
if (m_DatagramDestination == nullptr)
|
||||
m_DatagramDestination = std::make_shared<i2p::datagram::DatagramDestination> (GetSharedFromThis ());
|
||||
return m_DatagramDestination;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue