send reply to DatabaseLookup through exploratory pool or directly only

This commit is contained in:
orignal 2014-08-27 10:13:17 -04:00
parent 8c87a0fc38
commit a096a3931d

View file

@ -656,10 +656,15 @@ namespace data
replyMsg = garlic.WrapSingleMessage (replyMsg, nullptr);
}
}
i2p::tunnel::tunnels.GetNextOutboundTunnel ()->SendTunnelDataMsg (buf+32, replyTunnelID, replyMsg);
auto exploratoryPool = i2p::tunnel::tunnels.GetExploratoryPool ();
auto outbound = exploratoryPool ? exploratoryPool->GetNextOutboundTunnel () : nullptr;
if (outbound)
outbound->SendTunnelDataMsg (buf+32, replyTunnelID, replyMsg);
else
i2p::transports.SendMessage (buf+32, i2p::CreateTunnelGatewayMsg (replyTunnelID, replyMsg));
}
else
i2p::transports.SendMessage (buf, replyMsg);
i2p::transports.SendMessage (buf+32, replyMsg);
}
i2p::DeleteI2NPMessage (msg);
}