mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
use shared_ptr for I2NP messages through tunnels
This commit is contained in:
parent
122b8c2a84
commit
4ed7e29896
16 changed files with 75 additions and 127 deletions
10
NetDb.cpp
10
NetDb.cpp
|
@ -597,7 +597,7 @@ namespace data
|
|||
{
|
||||
i2p::tunnel::eDeliveryTypeRouter,
|
||||
nextFloodfill->GetIdentHash (), 0,
|
||||
CreateDatabaseStoreMsg ()
|
||||
ToSharedI2NPMessage (CreateDatabaseStoreMsg ())
|
||||
});
|
||||
|
||||
// request destination
|
||||
|
@ -606,7 +606,7 @@ namespace data
|
|||
msgs.push_back (i2p::tunnel::TunnelMessageBlock
|
||||
{
|
||||
i2p::tunnel::eDeliveryTypeRouter,
|
||||
nextFloodfill->GetIdentHash (), 0, msg
|
||||
nextFloodfill->GetIdentHash (), 0, ToSharedI2NPMessage (msg)
|
||||
});
|
||||
deleteDest = false;
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ namespace data
|
|||
if (outbound)
|
||||
outbound->SendTunnelDataMsg (buf+32, replyTunnelID, replyMsg);
|
||||
else
|
||||
transports.SendMessage (buf+32, i2p::CreateTunnelGatewayMsg (replyTunnelID, replyMsg));
|
||||
transports.SendMessage (buf+32, i2p::CreateTunnelGatewayMsg (replyTunnelID, ToSharedI2NPMessage(replyMsg)));
|
||||
}
|
||||
else
|
||||
transports.SendMessage (buf+32, replyMsg);
|
||||
|
@ -804,13 +804,13 @@ namespace data
|
|||
{
|
||||
i2p::tunnel::eDeliveryTypeRouter,
|
||||
floodfill->GetIdentHash (), 0,
|
||||
CreateDatabaseStoreMsg () // tell floodfill about us
|
||||
ToSharedI2NPMessage (CreateDatabaseStoreMsg ()) // tell floodfill about us
|
||||
});
|
||||
msgs.push_back (i2p::tunnel::TunnelMessageBlock
|
||||
{
|
||||
i2p::tunnel::eDeliveryTypeRouter,
|
||||
floodfill->GetIdentHash (), 0,
|
||||
dest->CreateRequestMessage (floodfill, inbound) // explore
|
||||
ToSharedI2NPMessage (dest->CreateRequestMessage (floodfill, inbound)) // explore
|
||||
});
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue