|
|
@ -664,7 +664,6 @@ namespace data |
|
|
|
|
|
|
|
|
|
|
|
I2NPMessage * replyMsg = nullptr; |
|
|
|
I2NPMessage * replyMsg = nullptr; |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
auto router = FindRouter (buf); |
|
|
|
auto router = FindRouter (buf); |
|
|
|
if (router) |
|
|
|
if (router) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -673,7 +672,7 @@ namespace data |
|
|
|
if (router->GetBuffer ()) |
|
|
|
if (router->GetBuffer ()) |
|
|
|
replyMsg = CreateDatabaseStoreMsg (router.get ()); |
|
|
|
replyMsg = CreateDatabaseStoreMsg (router.get ()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!replyMsg) |
|
|
|
if (!replyMsg) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto leaseSet = FindLeaseSet (buf); |
|
|
|
auto leaseSet = FindLeaseSet (buf); |
|
|
@ -693,7 +692,14 @@ namespace data |
|
|
|
excludedRouters.insert (excluded); |
|
|
|
excludedRouters.insert (excluded); |
|
|
|
excluded += 32; |
|
|
|
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 |
|
|
|
else |
|
|
|
excluded += numExcluded*32; // we don't care about exluded
|
|
|
|
excluded += numExcluded*32; // we don't care about exluded
|
|
|
|