mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-17 21:26:04 +00:00
Merge branch 'check_pr_653' into upstream-openssl
This commit is contained in:
commit
09a0cf07e4
@ -171,7 +171,7 @@ namespace client
|
|||||||
|
|
||||||
std::shared_ptr<const i2p::data::LeaseSet> LeaseSetDestination::FindLeaseSet (const i2p::data::IdentHash& ident)
|
std::shared_ptr<const i2p::data::LeaseSet> LeaseSetDestination::FindLeaseSet (const i2p::data::IdentHash& ident)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(m_RemoteLeaseSetsMutex);
|
std::unique_lock<std::mutex> lock(m_RemoteLeaseSetsMutex);
|
||||||
auto it = m_RemoteLeaseSets.find (ident);
|
auto it = m_RemoteLeaseSets.find (ident);
|
||||||
if (it != m_RemoteLeaseSets.end ())
|
if (it != m_RemoteLeaseSets.end ())
|
||||||
{
|
{
|
||||||
@ -185,10 +185,8 @@ namespace client
|
|||||||
if(ls && !ls->IsExpired())
|
if(ls && !ls->IsExpired())
|
||||||
{
|
{
|
||||||
ls->PopulateLeases();
|
ls->PopulateLeases();
|
||||||
{
|
std::unique_lock<std::mutex> lock(m_RemoteLeaseSetsMutex);
|
||||||
std::lock_guard<std::mutex> _lock(m_RemoteLeaseSetsMutex);
|
m_RemoteLeaseSets[ident] = ls;
|
||||||
m_RemoteLeaseSets[ident] = ls;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -203,15 +201,12 @@ namespace client
|
|||||||
if (ls && !ls->IsExpired ())
|
if (ls && !ls->IsExpired ())
|
||||||
{
|
{
|
||||||
ls->PopulateLeases (); // since we don't store them in netdb
|
ls->PopulateLeases (); // since we don't store them in netdb
|
||||||
{
|
m_RemoteLeaseSets[ident] = ls;
|
||||||
std::lock_guard<std::mutex> lock(m_RemoteLeaseSetsMutex);
|
|
||||||
m_RemoteLeaseSets[ident] = ls;
|
|
||||||
}
|
|
||||||
return ls;
|
return ls;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<const i2p::data::LocalLeaseSet> LeaseSetDestination::GetLeaseSet ()
|
std::shared_ptr<const i2p::data::LocalLeaseSet> LeaseSetDestination::GetLeaseSet ()
|
||||||
{
|
{
|
||||||
|
8
I2CP.cpp
8
I2CP.cpp
@ -103,7 +103,8 @@ namespace client
|
|||||||
}
|
}
|
||||||
auto path = remoteSession->GetSharedRoutingPath ();
|
auto path = remoteSession->GetSharedRoutingPath ();
|
||||||
std::shared_ptr<i2p::tunnel::OutboundTunnel> outboundTunnel;
|
std::shared_ptr<i2p::tunnel::OutboundTunnel> outboundTunnel;
|
||||||
std::shared_ptr<const i2p::data::Lease> remoteLease;
|
std::shared_ptr<const i2p::data::Lease> remoteLease;
|
||||||
|
bool unconfirmedTags=false;
|
||||||
if (path)
|
if (path)
|
||||||
{
|
{
|
||||||
if (!remoteSession->CleanupUnconfirmedTags ()) // no stuck tags
|
if (!remoteSession->CleanupUnconfirmedTags ()) // no stuck tags
|
||||||
@ -112,9 +113,12 @@ namespace client
|
|||||||
remoteLease = path->remoteLease;
|
remoteLease = path->remoteLease;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
remoteSession->SetSharedRoutingPath (nullptr);
|
remoteSession->SetSharedRoutingPath (nullptr);
|
||||||
|
unconfirmedTags=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
if (!path || unconfirmedTags)
|
||||||
{
|
{
|
||||||
outboundTunnel = GetTunnelPool ()->GetNextOutboundTunnel ();
|
outboundTunnel = GetTunnelPool ()->GetNextOutboundTunnel ();
|
||||||
auto leases = remote->GetNonExpiredLeases ();
|
auto leases = remote->GetNonExpiredLeases ();
|
||||||
|
@ -37,11 +37,16 @@ ifeq ($(USE_WIN32_APP), yes)
|
|||||||
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
|
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_AESNI),1)
|
ifeq ($(USE_AESNI),yes)
|
||||||
CPU_FLAGS = -maes -DAESNI
|
CPU_FLAGS = -maes -DAESNI
|
||||||
else
|
else
|
||||||
CPU_FLAGS = -msse
|
CPU_FLAGS = -msse
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_ASLR),yes)
|
||||||
|
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va \
|
||||||
|
-Wl,--dynamicbase,--export-all-symbols
|
||||||
|
endif
|
||||||
|
|
||||||
obj/%.o : %.rc
|
obj/%.o : %.rc
|
||||||
$(WINDRES) -i $< -o $@
|
$(WINDRES) -i $< -o $@
|
||||||
|
Loading…
Reference in New Issue
Block a user