mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
Compare commits
3 Commits
903dfb033d
...
23ec2bd6d8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23ec2bd6d8 | ||
|
|
8a7c4040b6 | ||
|
|
ff0b6a6a6a |
@@ -315,22 +315,28 @@ namespace tunnel
|
||||
void OutboundTunnel::SendTunnelDataMsgTo (const uint8_t * gwHash, uint32_t gwTunnel, std::shared_ptr<i2p::I2NPMessage> msg)
|
||||
{
|
||||
TunnelMessageBlock block;
|
||||
block.tunnelID = 0; // Initialize tunnelID to a default value
|
||||
|
||||
if (gwHash)
|
||||
{
|
||||
block.hash = gwHash;
|
||||
if (gwTunnel)
|
||||
{
|
||||
block.deliveryType = eDeliveryTypeTunnel;
|
||||
block.tunnelID = gwTunnel;
|
||||
block.tunnelID = gwTunnel; // Set tunnelID only if gwTunnel is non-zero
|
||||
}
|
||||
else
|
||||
{
|
||||
block.deliveryType = eDeliveryTypeRouter;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
block.deliveryType = eDeliveryTypeLocal;
|
||||
}
|
||||
|
||||
block.data = msg;
|
||||
|
||||
SendTunnelDataMsgs ({block});
|
||||
SendTunnelDataMsgs({block});
|
||||
}
|
||||
|
||||
void OutboundTunnel::SendTunnelDataMsgs (const std::vector<TunnelMessageBlock>& msgs)
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace tunnel
|
||||
void HandleDecryptedTunnelDataMsg (std::shared_ptr<I2NPMessage> msg);
|
||||
void FlushI2NPMsgs ();
|
||||
|
||||
const i2p::data::IdentHash * GetCurrentHash () const; // return null if not avaiable
|
||||
const i2p::data::IdentHash * GetCurrentHash () const; // return null if not available
|
||||
const std::unique_ptr<TunnelTransportSender>& GetSender () const { return m_Sender; };
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user