copy transit message for nedb

This commit is contained in:
orignal 2016-01-31 18:27:47 -05:00
parent 4f6c3d52b3
commit 0966369723
4 changed files with 18 additions and 7 deletions

View file

@ -80,6 +80,15 @@ namespace i2p
LogPrint (eLogError, "I2NP: message length ", len, " exceeds max length");
return msg;
}
std::shared_ptr<I2NPMessage> CopyI2NPMessage (std::shared_ptr<I2NPMessage> msg)
{
if (!msg) return nullptr;
auto newMsg = NewI2NPMessage (msg->len);
newMsg->offset = msg->offset;
*newMsg = *msg;
return newMsg;
}
std::shared_ptr<I2NPMessage> CreateDeliveryStatusMsg (uint32_t msgID)
{