Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Mar 4, 2023
1 parent d50cf0a commit 3154eda
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions libi2pd/RouterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,13 +535,13 @@ namespace data
case CAPS_FLAG_UNREACHABLE:
m_Caps |= Caps::eUnreachable;
break;
case CAPS_FLAG_MEDIUM_COGNESTION:
case CAPS_FLAG_MEDIUM_CONGESTION:
m_Congestion = eMediumCongestion;
break;
case CAPS_FLAG_HIGH_COGNESTION:
case CAPS_FLAG_HIGH_CONGESTION:
m_Congestion = eHighCongestion;
break;
case CAPS_FLAG_REJECT_ALL_COGNESTION:
case CAPS_FLAG_REJECT_ALL_CONGESTION:
m_Congestion = eRejectAll;
break;
default: ;
Expand Down Expand Up @@ -1071,7 +1071,7 @@ namespace data
if (m_Congestion == eLowCongestion || m_Congestion == eMediumCongestion) return false;
if (m_Congestion == eRejectAll) return true;
if (m_Congestion == eHighCongestion)
return (i2p::util::GetMillisecondsSinceEpoch () < m_Timestamp + HIGH_COGNESION_INTERVAL*1000LL) ? true : false;
return (i2p::util::GetMillisecondsSinceEpoch () < m_Timestamp + HIGH_CONGESION_INTERVAL*1000LL) ? true : false;
return false;
}

Expand Down Expand Up @@ -1129,13 +1129,13 @@ namespace data
switch (GetCongestion ())
{
case eMediumCongestion:
caps += CAPS_FLAG_MEDIUM_COGNESTION;
caps += CAPS_FLAG_MEDIUM_CONGESTION;
break;
case eHighCongestion:
caps += CAPS_FLAG_HIGH_COGNESTION;
caps += CAPS_FLAG_HIGH_CONGESTION;
break;
case eRejectAll:
caps += CAPS_FLAG_REJECT_ALL_COGNESTION;
caps += CAPS_FLAG_REJECT_ALL_CONGESTION;
break;
default: ;
};
Expand Down
8 changes: 4 additions & 4 deletions libi2pd/RouterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ namespace data
const char CAPS_FLAG_EXTRA_BANDWIDTH1 = 'P'; /* 256-2000 KBps */
const char CAPS_FLAG_EXTRA_BANDWIDTH2 = 'X'; /* > 2000 KBps */
// congesion flags
const char CAPS_FLAG_MEDIUM_COGNESTION = 'D';
const char CAPS_FLAG_HIGH_COGNESTION = 'E';
const char CAPS_FLAG_REJECT_ALL_COGNESTION = 'G';
const char CAPS_FLAG_MEDIUM_CONGESTION = 'D';
const char CAPS_FLAG_HIGH_CONGESTION = 'E';
const char CAPS_FLAG_REJECT_ALL_CONGESTION = 'G';

const char CAPS_FLAG_V4 = '4';
const char CAPS_FLAG_V6 = '6';
Expand All @@ -60,7 +60,7 @@ namespace data
const uint8_t COST_SSU2_NON_PUBLISHED = 15;

const size_t MAX_RI_BUFFER_SIZE = 3072; // if RouterInfo exceeds 3K we consider it as malformed, might extend later
const int HIGH_COGNESION_INTERVAL = 15*60; // in seconds, 15 minutes
const int HIGH_CONGESION_INTERVAL = 15*60; // in seconds, 15 minutes

class RouterInfo: public RoutingDestination
{
Expand Down

0 comments on commit 3154eda

Please sign in to comment.