mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
log initial destination request
This commit is contained in:
parent
535fbdb4c9
commit
5ed76b997c
@ -788,6 +788,8 @@ namespace data
|
||||
direct = false; // floodfill can't be reached directly
|
||||
if (direct)
|
||||
{
|
||||
if (CheckLogLevel (eLogDebug))
|
||||
LogPrint (eLogDebug, "NetDb: Request ", dest->GetDestination ().ToBase64 (), " at ", floodfill->GetIdentHash ().ToBase64 (), " directly");
|
||||
auto msg = dest->CreateRequestMessage (floodfill->GetIdentHash ());
|
||||
msg->onDrop = [this, dest]() { if (dest->IsActive ()) this->m_Requests.SendNextRequest (dest); };
|
||||
transports.SendMessage (floodfill->GetIdentHash (), msg);
|
||||
@ -799,6 +801,8 @@ namespace data
|
||||
auto inbound = pool ? pool->GetNextInboundTunnel (nullptr, floodfill->GetCompatibleTransports (true)) : nullptr;
|
||||
if (outbound && inbound)
|
||||
{
|
||||
if (CheckLogLevel (eLogDebug))
|
||||
LogPrint (eLogDebug, "NetDb: Request ", dest->GetDestination ().ToBase64 (), " at ", floodfill->GetIdentHash ().ToBase64 (), " through tunnels");
|
||||
auto msg = dest->CreateRequestMessage (floodfill, inbound);
|
||||
msg->onDrop = [this, dest]() { if (dest->IsActive ()) this->m_Requests.SendNextRequest (dest); };
|
||||
outbound->SendTunnelDataMsgTo (floodfill->GetIdentHash (), 0,
|
||||
@ -827,7 +831,8 @@ namespace data
|
||||
LogPrint (eLogWarning, "NetDb: Destination ", destination.ToBase64(), " is requested already");
|
||||
return;
|
||||
}
|
||||
LogPrint(eLogInfo, "NetDb: Destination ", destination.ToBase64(), " being requested directly from ", from.ToBase64());
|
||||
if (CheckLogLevel (eLogDebug))
|
||||
LogPrint(eLogDebug, "NetDb: Destination ", destination.ToBase64(), " being requested directly from ", from.ToBase64());
|
||||
// direct
|
||||
transports.SendMessage (from, dest->CreateRequestMessage (nullptr, nullptr));
|
||||
}
|
||||
@ -1002,7 +1007,7 @@ namespace data
|
||||
}
|
||||
else if (!m_FloodfillBootstrap)
|
||||
{
|
||||
LogPrint (eLogWarning, "NetDb: Unsolicited database search reply for ", key);
|
||||
LogPrint (eLogInfo, "NetDb: Unsolicited or late database search reply for ", key);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,8 @@ namespace data
|
||||
direct = false; // floodfill can't be reached directly
|
||||
if (direct)
|
||||
{
|
||||
LogPrint (eLogDebug, "NetDbReq: Try ", dest->GetDestination ().ToBase64 (), " at ", count, " floodfill ", nextFloodfill->GetIdentHash ().ToBase64 (), " directly");
|
||||
if (CheckLogLevel (eLogDebug))
|
||||
LogPrint (eLogDebug, "NetDbReq: Try ", dest->GetDestination ().ToBase64 (), " at ", count, " floodfill ", nextFloodfill->GetIdentHash ().ToBase64 (), " directly");
|
||||
auto msg = dest->CreateRequestMessage (nextFloodfill->GetIdentHash ());
|
||||
msg->onDrop = [this, dest]() { if (dest->IsActive ()) this->SendNextRequest (dest); };
|
||||
i2p::transport::transports.SendMessage (nextFloodfill->GetIdentHash (), msg);
|
||||
@ -231,7 +232,8 @@ namespace data
|
||||
auto inbound = pool->GetNextInboundTunnel ();
|
||||
if (nextFloodfill && outbound && inbound)
|
||||
{
|
||||
LogPrint (eLogDebug, "NetDbReq: Try ", dest->GetDestination ().ToBase64 (), " at ", count, " floodfill ", nextFloodfill->GetIdentHash ().ToBase64 (), " through tunnels");
|
||||
if (CheckLogLevel (eLogDebug))
|
||||
LogPrint (eLogDebug, "NetDbReq: Try ", dest->GetDestination ().ToBase64 (), " at ", count, " floodfill ", nextFloodfill->GetIdentHash ().ToBase64 (), " through tunnels");
|
||||
auto msg = dest->CreateRequestMessage (nextFloodfill, inbound);
|
||||
msg->onDrop = [this, dest]() { if (dest->IsActive ()) this->SendNextRequest (dest); };
|
||||
outbound->SendTunnelDataMsgTo (nextFloodfill->GetIdentHash (), 0,
|
||||
|
Loading…
Reference in New Issue
Block a user