mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
use shared_ptr for DeliverStatus
This commit is contained in:
parent
a05a20440e
commit
206f094dd4
6 changed files with 8 additions and 11 deletions
|
@ -471,18 +471,15 @@ namespace data
|
|||
uint32_t tunnelID = bufbe32toh (buf + offset);
|
||||
offset += 4;
|
||||
if (!tunnelID) // send response directly
|
||||
transports.SendMessage (buf + offset, ToSharedI2NPMessage (deliveryStatus));
|
||||
transports.SendMessage (buf + offset, deliveryStatus);
|
||||
else
|
||||
{
|
||||
auto pool = i2p::tunnel::tunnels.GetExploratoryPool ();
|
||||
auto outbound = pool ? pool->GetNextOutboundTunnel () : nullptr;
|
||||
if (outbound)
|
||||
outbound->SendTunnelDataMsg (buf + offset, tunnelID, ToSharedI2NPMessage (deliveryStatus));
|
||||
outbound->SendTunnelDataMsg (buf + offset, tunnelID, deliveryStatus);
|
||||
else
|
||||
{
|
||||
LogPrint (eLogError, "No outbound tunnels for DatabaseStore reply found");
|
||||
DeleteI2NPMessage (deliveryStatus);
|
||||
}
|
||||
}
|
||||
offset += 32;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue