mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-24 10:14:13 +00:00
datagram fixes
This commit is contained in:
parent
c6556b8442
commit
7d37b02cff
@ -547,8 +547,7 @@ namespace client
|
|||||||
auto datagram = dest->GetDatagramDestination ();
|
auto datagram = dest->GetDatagramDestination ();
|
||||||
if(datagram == nullptr) datagram = dest->CreateDatagramDestination();
|
if(datagram == nullptr) datagram = dest->CreateDatagramDestination();
|
||||||
datagram->SetReceiver (std::bind (&AddressBook::HandleLookupResponse, this,
|
datagram->SetReceiver (std::bind (&AddressBook::HandleLookupResponse, this,
|
||||||
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5),
|
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5));
|
||||||
ADDRESS_RESPONSE_DATAGRAM_PORT);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,7 +558,7 @@ namespace client
|
|||||||
{
|
{
|
||||||
auto datagram = dest->GetDatagramDestination ();
|
auto datagram = dest->GetDatagramDestination ();
|
||||||
if (datagram)
|
if (datagram)
|
||||||
datagram->ResetReceiver (ADDRESS_RESPONSE_DATAGRAM_PORT);
|
datagram->ResetReceiver ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -590,14 +590,14 @@ namespace client
|
|||||||
m_LocalDest = localDestination;
|
m_LocalDest = localDestination;
|
||||||
m_LocalDest->Start();
|
m_LocalDest->Start();
|
||||||
auto dgram = m_LocalDest->CreateDatagramDestination();
|
auto dgram = m_LocalDest->CreateDatagramDestination();
|
||||||
dgram->SetReceiver(std::bind(&I2PUDPServerTunnel::HandleRecvFromI2P, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5), 0);
|
dgram->SetReceiver(std::bind(&I2PUDPServerTunnel::HandleRecvFromI2P, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5));
|
||||||
}
|
}
|
||||||
|
|
||||||
I2PUDPServerTunnel::~I2PUDPServerTunnel()
|
I2PUDPServerTunnel::~I2PUDPServerTunnel()
|
||||||
{
|
{
|
||||||
auto dgram = m_LocalDest->GetDatagramDestination();
|
auto dgram = m_LocalDest->GetDatagramDestination();
|
||||||
if (dgram) {
|
if (dgram) {
|
||||||
dgram->ResetReceiver(0);
|
dgram->ResetReceiver();
|
||||||
}
|
}
|
||||||
LogPrint(eLogInfo, "UDPServer: done");
|
LogPrint(eLogInfo, "UDPServer: done");
|
||||||
}
|
}
|
||||||
@ -671,7 +671,7 @@ namespace client
|
|||||||
I2PUDPClientTunnel::~I2PUDPClientTunnel() {
|
I2PUDPClientTunnel::~I2PUDPClientTunnel() {
|
||||||
auto dgram = m_LocalDest->GetDatagramDestination();
|
auto dgram = m_LocalDest->GetDatagramDestination();
|
||||||
if (dgram) {
|
if (dgram) {
|
||||||
dgram->ResetReceiver(LocalPort);
|
dgram->ResetReceiver();
|
||||||
}
|
}
|
||||||
if (m_Session) delete m_Session;
|
if (m_Session) delete m_Session;
|
||||||
m_cancel_resolve = true;
|
m_cancel_resolve = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user