From bb2fcbf668d475fdc3418b2ef80da399d3c7de17 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 26 Jan 2014 09:06:06 -0500 Subject: [PATCH] print out message type sent to an inbound tunnel --- I2NPProtocol.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/I2NPProtocol.cpp b/I2NPProtocol.cpp index 502a2e40..6503d70f 100644 --- a/I2NPProtocol.cpp +++ b/I2NPProtocol.cpp @@ -386,15 +386,13 @@ namespace i2p TunnelGatewayHeader * header = (TunnelGatewayHeader *)msg->GetPayload (); uint32_t tunnelID = be32toh(header->tunnelID); uint16_t len = be16toh(header->length); - LogPrint ("TunnelGateway of ", (int)len, " bytes for tunnel ", (unsigned int)tunnelID); + // we make payload as new I2NP message to send + 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); i2p::tunnel::TransitTunnel * tunnel = i2p::tunnel::tunnels.GetTransitTunnel (tunnelID); if (tunnel) - { - // we make payload as new I2NP message to send - msg->offset += sizeof (I2NPHeader) + sizeof (TunnelGatewayHeader); - msg->len = msg->offset + len; tunnel->SendTunnelDataMsg (nullptr, 0, msg); - } else { LogPrint ("Tunnel ", (unsigned int)tunnelID, " not found");