Browse Source

catch transit DatabaseStore

pull/73/merge
orignal 11 years ago
parent
commit
d4ac1391fe
  1. 7
      I2NPProtocol.cpp

7
I2NPProtocol.cpp

@ -435,6 +435,13 @@ namespace i2p @@ -435,6 +435,13 @@ namespace i2p
msg->offset += sizeof (I2NPHeader) + sizeof (TunnelGatewayHeader);
msg->len = msg->offset + len;
LogPrint ("TunnelGateway of ", (int)len, " bytes for tunnel ", (unsigned int)tunnelID, ". Msg type ", (int)msg->GetHeader()->typeID);
if (msg->GetHeader()->typeID == eI2NPDatabaseStore)
{
// transit DatabaseStore my contain new/updated RI
auto ds = NewI2NPMessage ();
*ds = *msg;
i2p::data::netdb.PostI2NPMsg (ds);
}
i2p::tunnel::TransitTunnel * tunnel = i2p::tunnel::tunnels.GetTransitTunnel (tunnelID);
if (tunnel)
tunnel->SendTunnelDataMsg (msg);

Loading…
Cancel
Save