|
|
@ -523,15 +523,20 @@ namespace client |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (addr->IsIdentHash ()) |
|
|
|
if (addr->IsIdentHash ()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto leaseSet = session->GetLocalDestination ()->FindLeaseSet(addr->identHash); |
|
|
|
if (session->GetLocalDestination ()->GetIdentHash () != addr->identHash) |
|
|
|
if (leaseSet) |
|
|
|
|
|
|
|
Connect(leaseSet, session); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
session->GetLocalDestination ()->RequestDestination(addr->identHash, |
|
|
|
auto leaseSet = session->GetLocalDestination ()->FindLeaseSet(addr->identHash); |
|
|
|
std::bind(&SAMSocket::HandleConnectLeaseSetRequestComplete, |
|
|
|
if (leaseSet) |
|
|
|
shared_from_this(), std::placeholders::_1)); |
|
|
|
Connect(leaseSet, session); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
session->GetLocalDestination ()->RequestDestination(addr->identHash, |
|
|
|
|
|
|
|
std::bind(&SAMSocket::HandleConnectLeaseSetRequestComplete, |
|
|
|
|
|
|
|
shared_from_this(), std::placeholders::_1)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SendStreamCantReachPeer ("Can't connect to myself"); |
|
|
|
} |
|
|
|
} |
|
|
|
else // B33
|
|
|
|
else // B33
|
|
|
|
session->GetLocalDestination ()->RequestDestinationWithEncryptedLeaseSet (addr->blindedPublicKey, |
|
|
|
session->GetLocalDestination ()->RequestDestinationWithEncryptedLeaseSet (addr->blindedPublicKey, |
|
|
|