mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
netdb.cpp:
* explicitly define replyIdent Daemon.cpp: * wait for 1 second before checking if transports are bound to wait for transports to bind
This commit is contained in:
parent
d7653769b4
commit
b8a205f755
|
@ -257,6 +257,7 @@ namespace i2p
|
|||
bool ssu; i2p::config::GetOption("ssu", ssu);
|
||||
LogPrint(eLogInfo, "Daemon: starting Transports");
|
||||
i2p::transport::transports.Start(ntcp, ssu);
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
if (i2p::transport::transports.IsBoundNTCP() || i2p::transport::transports.IsBoundSSU()) {
|
||||
LogPrint(eLogInfo, "Daemon: Transports started");
|
||||
} else {
|
||||
|
|
|
@ -617,6 +617,9 @@ namespace data
|
|||
int l = i2p::data::ByteStreamToBase64 (buf, 32, key, 48);
|
||||
key[l] = 0;
|
||||
uint8_t flag = buf[64];
|
||||
|
||||
IdentHash replyIdent(buf + 32);
|
||||
|
||||
LogPrint (eLogDebug, "NetDb: DatabaseLookup for ", key, " recieved flags=", (int)flag);
|
||||
uint8_t lookupType = flag & DATABASE_LOOKUP_TYPE_FLAGS_MASK;
|
||||
const uint8_t * excluded = buf + 65;
|
||||
|
@ -739,12 +742,12 @@ namespace data
|
|||
auto exploratoryPool = i2p::tunnel::tunnels.GetExploratoryPool ();
|
||||
auto outbound = exploratoryPool ? exploratoryPool->GetNextOutboundTunnel () : nullptr;
|
||||
if (outbound)
|
||||
outbound->SendTunnelDataMsg (buf+32, replyTunnelID, replyMsg);
|
||||
outbound->SendTunnelDataMsg (replyIdent, replyTunnelID, replyMsg);
|
||||
else
|
||||
transports.SendMessage (buf+32, i2p::CreateTunnelGatewayMsg (replyTunnelID, replyMsg));
|
||||
transports.SendMessage (replyIdent, i2p::CreateTunnelGatewayMsg (replyTunnelID, replyMsg));
|
||||
}
|
||||
else
|
||||
transports.SendMessage (buf+32, replyMsg);
|
||||
transports.SendMessage (replyIdent, replyMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue