Browse Source

tags confirmed

pull/102/head
orignal 10 years ago
parent
commit
0cdb7c679e
  1. 4
      Garlic.cpp
  2. 4
      Garlic.h

4
Garlic.cpp

@ -55,7 +55,7 @@ namespace garlic @@ -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 @@ -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");
}

4
Garlic.h

@ -50,9 +50,7 @@ namespace garlic @@ -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; };

Loading…
Cancel
Save