From 1bad097a132db6197157b5f0e267a244f3c888bb Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 30 Jun 2016 17:21:18 -0400 Subject: [PATCH] don't check for LS expired for FF --- LeaseSet.cpp | 2 +- NetDb.cpp | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/LeaseSet.cpp b/LeaseSet.cpp index 16a470e0..fafe14b7 100644 --- a/LeaseSet.cpp +++ b/LeaseSet.cpp @@ -190,7 +190,7 @@ namespace data bool LeaseSet::IsExpired () const { - if (IsEmpty ()) return true; + if (m_StoreLeases && IsEmpty ()) return true; auto ts = i2p::util::GetMillisecondsSinceEpoch (); return ts > m_ExpirationTime; } diff --git a/NetDb.cpp b/NetDb.cpp index 98dafd99..0bf21f6c 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -462,7 +462,7 @@ namespace data bool updated = false; if (buf[DATABASE_STORE_TYPE_OFFSET]) // type { - LogPrint (eLogDebug, "NetDb: store request: LeaseSet"); + LogPrint (eLogDebug, "NetDb: store request: LeaseSet for ", ident); updated = AddLeaseSet (ident, buf + offset, len - offset, m->from); } else @@ -688,14 +688,6 @@ namespace data LogPrint (eLogDebug, "NetDb: requested LeaseSet ", key, " found"); replyMsg = CreateDatabaseStoreMsg (leaseSet); } - else if (!leaseSet->IsEmpty()) - { - LogPrint (eLogDebug, "NetDb: requested Expired LeaseSet ", key); - // remove LS as it is expired - m_LeaseSets.erase(ident); - } - else - LogPrint(eLogWarning, "NetDb: LeaseSet is empty? ", ident.ToBase32()); } if (!replyMsg)