From 481b54a8173b70a99681f539a6c683d006ecca4f Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 24 Aug 2014 22:34:13 -0400 Subject: [PATCH] send our router information with RI request only --- NetDb.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/NetDb.cpp b/NetDb.cpp index 96bc0edf..3b86fe98 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -498,13 +498,16 @@ namespace data if (!dest->IsExcluded (r->GetIdentHash ()) && dest->GetNumExcludedPeers () < 30) // TODO: fix TunnelGateway first { LogPrint ("Try ", key, " at floodfill ", peerHash); - // tell floodfill about us - msgs.push_back (i2p::tunnel::TunnelMessageBlock - { - i2p::tunnel::eDeliveryTypeRouter, - r->GetIdentHash (), 0, - CreateDatabaseStoreMsg () - }); + if (!dest->IsLeaseSet ()) + { + // tell floodfill about us + msgs.push_back (i2p::tunnel::TunnelMessageBlock + { + i2p::tunnel::eDeliveryTypeRouter, + r->GetIdentHash (), 0, + CreateDatabaseStoreMsg () + }); + } // request destination auto msg = dest->CreateRequestMessage (r, inbound); msgs.push_back (i2p::tunnel::TunnelMessageBlock