mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 10:42:35 +00:00
remote LeaseSets per local destination
This commit is contained in:
1 parent
22937e1b54
commit
eff0e13f31
7 files changed
+77
-15
No files matched your search
@@ -60,7 +60,7 @@ namespace stream
|
||||
;
|
||||
}
|
||||
m_Socket.close ();
|
||||
delete this;
|
||||
// delete this;
|
||||
}
|
||||
|
||||
void SAMSocket::ReceiveHandshake ()
|
||||
@@ -275,7 +275,7 @@ namespace stream
|
||||
{
|
||||
if (!ecode) // timeout expired
|
||||
{
|
||||
auto leaseSet = i2p::data::netdb.FindLeaseSet (ident);
|
||||
auto leaseSet = m_Session->localDestination->FindLeaseSet (ident);
|
||||
if (leaseSet)
|
||||
Connect (*leaseSet);
|
||||
else
|
||||
@@ -290,7 +290,7 @@ namespace stream
|
||||
{
|
||||
if (!ecode) // timeout expired
|
||||
{
|
||||
auto leaseSet = i2p::data::netdb.FindLeaseSet (ident);
|
||||
auto leaseSet = m_Session->localDestination->FindLeaseSet (ident);
|
||||
if (leaseSet)
|
||||
SendNamingLookupReply (leaseSet);
|
||||
else
|
||||
@@ -361,7 +361,7 @@ namespace stream
|
||||
SendNamingLookupReply (nullptr);
|
||||
else if (i2p::data::netdb.GetAddressBook ().GetIdentHash (name, ident))
|
||||
{
|
||||
auto leaseSet = i2p::data::netdb.FindLeaseSet (ident);
|
||||
auto leaseSet = m_Session->localDestination->FindLeaseSet (ident);
|
||||
if (leaseSet)
|
||||
SendNamingLookupReply (leaseSet);
|
||||
else
|
||||
@@ -379,7 +379,7 @@ namespace stream
|
||||
}
|
||||
}
|
||||
|
||||
void SAMSocket::SendNamingLookupReply (i2p::data::LeaseSet * leaseSet)
|
||||
void SAMSocket::SendNamingLookupReply (const i2p::data::LeaseSet * leaseSet)
|
||||
{
|
||||
uint8_t buf[1024];
|
||||
char pub[1024];
|
||||
@@ -448,7 +448,7 @@ namespace stream
|
||||
{
|
||||
LogPrint ("SAM stream read error: ", ecode.message ());
|
||||
if (ecode != boost::asio::error::operation_aborted)
|
||||
m_Socket.get_io_service ().post (boost::bind (&SAMSocket::Terminate, this));
|
||||
Terminate ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user