Browse Source

[tunnels] count outbound traffic for zero-hop tunnels

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1682/head
R4SAS 3 years ago
parent
commit
d88fe203e1
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 3
      libi2pd/Tunnel.cpp

3
libi2pd/Tunnel.cpp

@ -328,10 +328,11 @@ namespace tunnel
for (auto& msg : msgs) for (auto& msg : msgs)
{ {
if (!msg.data) continue; if (!msg.data) continue;
m_NumSentBytes += msg.data->GetLength ();
switch (msg.deliveryType) switch (msg.deliveryType)
{ {
case eDeliveryTypeLocal: case eDeliveryTypeLocal:
i2p::HandleI2NPMessage (msg.data); HandleI2NPMessage (msg.data);
break; break;
case eDeliveryTypeTunnel: case eDeliveryTypeTunnel:
i2p::transport::transports.SendMessage (msg.hash, i2p::CreateTunnelGatewayMsg (msg.tunnelID, msg.data)); i2p::transport::transports.SendMessage (msg.hash, i2p::CreateTunnelGatewayMsg (msg.tunnelID, msg.data));

Loading…
Cancel
Save