mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
tags confirmed
This commit is contained in:
parent
4ceac19624
commit
0cdb7c679e
@ -55,7 +55,7 @@ namespace garlic
|
|||||||
for (int i = 0; i < m_NumTags; i++)
|
for (int i = 0; i < m_NumTags; i++)
|
||||||
m_Rnd.GenerateBlock (m_SessionTags[i], 32);
|
m_Rnd.GenerateBlock (m_SessionTags[i], 32);
|
||||||
m_TagsCreationTime = i2p::util::GetSecondsSinceEpoch ();
|
m_TagsCreationTime = i2p::util::GetSecondsSinceEpoch ();
|
||||||
SetAcknowledged (false);
|
m_IsAcknowledged = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ namespace garlic
|
|||||||
auto it = m_CreatedSessions.find (msgID);
|
auto it = m_CreatedSessions.find (msgID);
|
||||||
if (it != m_CreatedSessions.end ())
|
if (it != m_CreatedSessions.end ())
|
||||||
{
|
{
|
||||||
it->second->SetAcknowledged (true);
|
it->second->TagsConfirmed (msgID);
|
||||||
m_CreatedSessions.erase (it);
|
m_CreatedSessions.erase (it);
|
||||||
LogPrint ("Garlic message ", msgID, " acknowledged");
|
LogPrint ("Garlic message ", msgID, " acknowledged");
|
||||||
}
|
}
|
||||||
|
4
Garlic.h
4
Garlic.h
@ -50,9 +50,7 @@ namespace garlic
|
|||||||
~GarlicRoutingSession ();
|
~GarlicRoutingSession ();
|
||||||
I2NPMessage * WrapSingleMessage (I2NPMessage * msg);
|
I2NPMessage * WrapSingleMessage (I2NPMessage * msg);
|
||||||
int GetNextTag () const { return m_NextTag; };
|
int GetNextTag () const { return m_NextTag; };
|
||||||
|
void TagsConfirmed (uint32_t msgID) { m_IsAcknowledged = true; };
|
||||||
bool IsAcknowledged () const { return m_IsAcknowledged; };
|
|
||||||
void SetAcknowledged (bool acknowledged) { m_IsAcknowledged = acknowledged; };
|
|
||||||
|
|
||||||
void SetLeaseSetUpdated () { m_LeaseSetUpdated = true; };
|
void SetLeaseSetUpdated () { m_LeaseSetUpdated = true; };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user