mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
Merge branch 'upstream-openssl'
This commit is contained in:
commit
03927b0a68
23 changed files with 85 additions and 76 deletions
12
LeaseSet.cpp
12
LeaseSet.cpp
|
@ -64,10 +64,10 @@ namespace data
|
|||
return;
|
||||
}
|
||||
|
||||
// reset existing leases
|
||||
// reset existing leases
|
||||
if (m_StoreLeases)
|
||||
for (auto it: m_Leases)
|
||||
it->isUpdated = false;
|
||||
for (auto& it: m_Leases)
|
||||
it->isUpdated = false;
|
||||
else
|
||||
m_Leases.clear ();
|
||||
|
||||
|
@ -123,7 +123,7 @@ namespace data
|
|||
m_Leases.erase (it++);
|
||||
}
|
||||
else
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ namespace data
|
|||
{
|
||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
std::vector<std::shared_ptr<const Lease> > leases;
|
||||
for (auto it: m_Leases)
|
||||
for (const auto& it: m_Leases)
|
||||
{
|
||||
auto endDate = it->endDate;
|
||||
if (withThreshold)
|
||||
|
@ -190,7 +190,7 @@ namespace data
|
|||
bool LeaseSet::HasExpiredLeases () const
|
||||
{
|
||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
for (auto it: m_Leases)
|
||||
for (const auto& it: m_Leases)
|
||||
if (ts >= it->endDate) return true;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue