Browse Source

fixed crash

pull/93/head
orignal 10 years ago
parent
commit
2f8274a7b3
  1. 4
      Garlic.cpp

4
Garlic.cpp

@ -418,7 +418,7 @@ namespace garlic
{ {
case eGarlicDeliveryTypeLocal: case eGarlicDeliveryTypeLocal:
LogPrint ("Garlic type local"); LogPrint ("Garlic type local");
i2p::HandleI2NPMessage (CreateI2NPMessage (buf, len)); i2p::HandleI2NPMessage (CreateI2NPMessage (buf, GetI2NPMessageLength (buf)));
break; break;
case eGarlicDeliveryTypeDestination: case eGarlicDeliveryTypeDestination:
{ {
@ -445,7 +445,7 @@ namespace garlic
auto tunnel = i2p::tunnel::tunnels.GetNextOutboundTunnel (); auto tunnel = i2p::tunnel::tunnels.GetNextOutboundTunnel ();
if (tunnel) // we have send it through an outbound tunnel if (tunnel) // we have send it through an outbound tunnel
{ {
I2NPMessage * msg = CreateI2NPMessage (buf, len - 36); I2NPMessage * msg = CreateI2NPMessage (buf, GetI2NPMessageLength (buf));
tunnel->SendTunnelDataMsg (gwHash, gwTunnel, msg); tunnel->SendTunnelDataMsg (gwHash, gwTunnel, msg);
} }
else else

Loading…
Cancel
Save