tags confirmed

This commit is contained in:
orignal 2014-10-14 13:49:40 -04:00
parent 4ceac19624
commit 0cdb7c679e
2 changed files with 3 additions and 5 deletions

View File

@ -55,7 +55,7 @@ namespace garlic
for (int i = 0; i < m_NumTags; i++)
m_Rnd.GenerateBlock (m_SessionTags[i], 32);
m_TagsCreationTime = i2p::util::GetSecondsSinceEpoch ();
SetAcknowledged (false);
m_IsAcknowledged = false;
}
}
@ -459,7 +459,7 @@ namespace garlic
auto it = m_CreatedSessions.find (msgID);
if (it != m_CreatedSessions.end ())
{
it->second->SetAcknowledged (true);
it->second->TagsConfirmed (msgID);
m_CreatedSessions.erase (it);
LogPrint ("Garlic message ", msgID, " acknowledged");
}

View File

@ -50,9 +50,7 @@ namespace garlic
~GarlicRoutingSession ();
I2NPMessage * WrapSingleMessage (I2NPMessage * msg);
int GetNextTag () const { return m_NextTag; };
bool IsAcknowledged () const { return m_IsAcknowledged; };
void SetAcknowledged (bool acknowledged) { m_IsAcknowledged = acknowledged; };
void TagsConfirmed (uint32_t msgID) { m_IsAcknowledged = true; };
void SetLeaseSetUpdated () { m_LeaseSetUpdated = true; };