|
|
|
@ -664,7 +664,6 @@ namespace data
@@ -664,7 +664,6 @@ namespace data
|
|
|
|
|
|
|
|
|
|
I2NPMessage * replyMsg = nullptr; |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
auto router = FindRouter (buf); |
|
|
|
|
if (router) |
|
|
|
|
{ |
|
|
|
@ -673,7 +672,7 @@ namespace data
@@ -673,7 +672,7 @@ namespace data
|
|
|
|
|
if (router->GetBuffer ()) |
|
|
|
|
replyMsg = CreateDatabaseStoreMsg (router.get ()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!replyMsg) |
|
|
|
|
{ |
|
|
|
|
auto leaseSet = FindLeaseSet (buf); |
|
|
|
@ -693,7 +692,14 @@ namespace data
@@ -693,7 +692,14 @@ namespace data
|
|
|
|
|
excludedRouters.insert (excluded); |
|
|
|
|
excluded += 32; |
|
|
|
|
} |
|
|
|
|
replyMsg = CreateDatabaseSearchReply (buf, GetClosestFloodfill (buf, excludedRouters).get ()); |
|
|
|
|
std::vector<IdentHash> routers; |
|
|
|
|
for (int i = 0; i < 3; i++) |
|
|
|
|
{ |
|
|
|
|
auto floodfill = GetClosestFloodfill (buf, excludedRouters); |
|
|
|
|
if (floodfill) |
|
|
|
|
routers.push_back (floodfill->GetIdentHash ()); |
|
|
|
|
} |
|
|
|
|
replyMsg = CreateDatabaseSearchReply (buf, routers); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
excluded += numExcluded*32; // we don't care about exluded
|
|
|
|
|