mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-10 19:38:28 +01:00
use common constants for babdwidth limits
Some checks failed
Build on Windows / clang-x86_64 (push) Has been cancelled
Build Debian packages / bookworm (push) Has been cancelled
Build Debian packages / bullseye (push) Has been cancelled
Build Debian packages / buster (push) Has been cancelled
Build on FreeBSD / with UPnP (push) Has been cancelled
Build on OSX / With USE_UPNP=no (push) Has been cancelled
Build on OSX / With USE_UPNP=yes (push) Has been cancelled
Build on Windows / i686 (push) Has been cancelled
Build on Windows / ucrt-x86_64 (push) Has been cancelled
Build on Windows / x86_64 (push) Has been cancelled
Build on Windows / CMake clang-x86_64 (push) Has been cancelled
Build on Windows / CMake i686 (push) Has been cancelled
Build on Windows / CMake ucrt-x86_64 (push) Has been cancelled
Build on Windows / CMake x86_64 (push) Has been cancelled
Build on Windows / XP (push) Has been cancelled
Build on Ubuntu / Make with USE_UPNP=no (push) Has been cancelled
Build on Ubuntu / Make with USE_UPNP=yes (push) Has been cancelled
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Has been cancelled
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Has been cancelled
Build containers / Building container for linux/amd64 (push) Has been cancelled
Build containers / Building container for linux/arm64 (push) Has been cancelled
Build containers / Building container for linux/arm/v7 (push) Has been cancelled
Build containers / Building container for linux/386 (push) Has been cancelled
Build containers / Pushing merged manifest (push) Has been cancelled
Some checks failed
Build on Windows / clang-x86_64 (push) Has been cancelled
Build Debian packages / bookworm (push) Has been cancelled
Build Debian packages / bullseye (push) Has been cancelled
Build Debian packages / buster (push) Has been cancelled
Build on FreeBSD / with UPnP (push) Has been cancelled
Build on OSX / With USE_UPNP=no (push) Has been cancelled
Build on OSX / With USE_UPNP=yes (push) Has been cancelled
Build on Windows / i686 (push) Has been cancelled
Build on Windows / ucrt-x86_64 (push) Has been cancelled
Build on Windows / x86_64 (push) Has been cancelled
Build on Windows / CMake clang-x86_64 (push) Has been cancelled
Build on Windows / CMake i686 (push) Has been cancelled
Build on Windows / CMake ucrt-x86_64 (push) Has been cancelled
Build on Windows / CMake x86_64 (push) Has been cancelled
Build on Windows / XP (push) Has been cancelled
Build on Ubuntu / Make with USE_UPNP=no (push) Has been cancelled
Build on Ubuntu / Make with USE_UPNP=yes (push) Has been cancelled
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Has been cancelled
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Has been cancelled
Build containers / Building container for linux/amd64 (push) Has been cancelled
Build containers / Building container for linux/arm64 (push) Has been cancelled
Build containers / Building container for linux/arm/v7 (push) Has been cancelled
Build containers / Building container for linux/386 (push) Has been cancelled
Build containers / Pushing merged manifest (push) Has been cancelled
This commit is contained in:
parent
9432202fad
commit
dcd15cc244
1 changed files with 6 additions and 6 deletions
|
@ -675,12 +675,12 @@ namespace i2p
|
||||||
|
|
||||||
void RouterContext::SetBandwidth (int limit)
|
void RouterContext::SetBandwidth (int limit)
|
||||||
{
|
{
|
||||||
if (limit > 2000) { SetBandwidth('X'); }
|
if (limit > (int)i2p::data::EXTRA_BANDWIDTH_LIMIT) { SetBandwidth('X'); }
|
||||||
else if (limit > 256) { SetBandwidth('P'); }
|
else if (limit > (int)i2p::data::HIGH_BANDWIDTH_LIMIT) { SetBandwidth('P'); }
|
||||||
else if (limit > 128) { SetBandwidth('O'); }
|
else if (limit > 128) { SetBandwidth('O'); }
|
||||||
else if (limit > 64) { SetBandwidth('N'); }
|
else if (limit > 64) { SetBandwidth('N'); }
|
||||||
else if (limit > 48) { SetBandwidth('M'); }
|
else if (limit > (int)i2p::data::LOW_BANDWIDTH_LIMIT) { SetBandwidth('M'); }
|
||||||
else if (limit > 12) { SetBandwidth('L'); }
|
else if (limit > 12) { SetBandwidth('L'); }
|
||||||
else { SetBandwidth('K'); }
|
else { SetBandwidth('K'); }
|
||||||
m_BandwidthLimit = limit; // set precise limit
|
m_BandwidthLimit = limit; // set precise limit
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue