Browse Source

Merge pull request #2066 from EKCKABATOP54/fix

Fixed checking the bandwidth flag in the config
pull/2072/head
orignal 4 months ago committed by GitHub
parent
commit
d8707ceb57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      daemon/Daemon.cpp

2
daemon/Daemon.cpp

@ -188,7 +188,7 @@ namespace util
std::string bandwidth; i2p::config::GetOption("bandwidth", bandwidth); std::string bandwidth; i2p::config::GetOption("bandwidth", bandwidth);
if (bandwidth.length () > 0) if (bandwidth.length () > 0)
{ {
if (bandwidth[0] >= 'K' && bandwidth[0] <= 'X') if (bandwidth.length () == 1 && ((bandwidth[0] >= 'K' && bandwidth[0] <= 'P') || bandwidth[0] == 'X' ))
{ {
i2p::context.SetBandwidth (bandwidth[0]); i2p::context.SetBandwidth (bandwidth[0]);
LogPrint(eLogInfo, "Daemon: Bandwidth set to ", i2p::context.GetBandwidthLimit (), "KBps"); LogPrint(eLogInfo, "Daemon: Bandwidth set to ", i2p::context.GetBandwidthLimit (), "KBps");

Loading…
Cancel
Save