|
|
@ -535,13 +535,13 @@ namespace data |
|
|
|
case CAPS_FLAG_UNREACHABLE: |
|
|
|
case CAPS_FLAG_UNREACHABLE: |
|
|
|
m_Caps |= Caps::eUnreachable; |
|
|
|
m_Caps |= Caps::eUnreachable; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case CAPS_FLAG_MEDIUM_COGNESTION: |
|
|
|
case CAPS_FLAG_MEDIUM_CONGESTION: |
|
|
|
m_Congestion = eMediumCongestion; |
|
|
|
m_Congestion = eMediumCongestion; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case CAPS_FLAG_HIGH_COGNESTION: |
|
|
|
case CAPS_FLAG_HIGH_CONGESTION: |
|
|
|
m_Congestion = eHighCongestion; |
|
|
|
m_Congestion = eHighCongestion; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case CAPS_FLAG_REJECT_ALL_COGNESTION: |
|
|
|
case CAPS_FLAG_REJECT_ALL_CONGESTION: |
|
|
|
m_Congestion = eRejectAll; |
|
|
|
m_Congestion = eRejectAll; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: ; |
|
|
|
default: ; |
|
|
@ -1071,7 +1071,7 @@ namespace data |
|
|
|
if (m_Congestion == eLowCongestion || m_Congestion == eMediumCongestion) return false; |
|
|
|
if (m_Congestion == eLowCongestion || m_Congestion == eMediumCongestion) return false; |
|
|
|
if (m_Congestion == eRejectAll) return true; |
|
|
|
if (m_Congestion == eRejectAll) return true; |
|
|
|
if (m_Congestion == eHighCongestion) |
|
|
|
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; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1129,13 +1129,13 @@ namespace data |
|
|
|
switch (GetCongestion ()) |
|
|
|
switch (GetCongestion ()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case eMediumCongestion: |
|
|
|
case eMediumCongestion: |
|
|
|
caps += CAPS_FLAG_MEDIUM_COGNESTION; |
|
|
|
caps += CAPS_FLAG_MEDIUM_CONGESTION; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case eHighCongestion: |
|
|
|
case eHighCongestion: |
|
|
|
caps += CAPS_FLAG_HIGH_COGNESTION; |
|
|
|
caps += CAPS_FLAG_HIGH_CONGESTION; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case eRejectAll: |
|
|
|
case eRejectAll: |
|
|
|
caps += CAPS_FLAG_REJECT_ALL_COGNESTION; |
|
|
|
caps += CAPS_FLAG_REJECT_ALL_CONGESTION; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: ; |
|
|
|
default: ; |
|
|
|
}; |
|
|
|
}; |
|
|
|