mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
pass delivery intructions to tunnel gateway
This commit is contained in:
parent
f5fa953458
commit
154105a059
8 changed files with 50 additions and 41 deletions
17
Tunnel.cpp
17
Tunnel.cpp
|
@ -142,22 +142,7 @@ namespace tunnel
|
|||
void OutboundTunnel::SendTunnelDataMsg (std::vector<TunnelMessageBlock> msgs)
|
||||
{
|
||||
for (auto& it : msgs)
|
||||
{
|
||||
switch (it.deliveryType)
|
||||
{
|
||||
case eDeliveryTypeLocal:
|
||||
m_Gateway.SendTunnelDataMsg (nullptr, 0, it.data);
|
||||
break;
|
||||
case eDeliveryTypeTunnel:
|
||||
m_Gateway.SendTunnelDataMsg (it.hash, it.tunnelID, it.data);
|
||||
break;
|
||||
case eDeliveryTypeRouter:
|
||||
m_Gateway.SendTunnelDataMsg (it.hash, 0, it.data);
|
||||
break;
|
||||
default:
|
||||
LogPrint ("Unexpected delivery type ", (int)it.deliveryType);
|
||||
}
|
||||
}
|
||||
m_Gateway.PutTunnelDataMsg (it);
|
||||
m_Gateway.SendBuffer ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue