mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-09-23 21:40:20 +01:00
Set default bandwidth to 256 KB/sec
This commit is contained in:
parent
f5b823a712
commit
b91a32fcc2
3 changed files with 8 additions and 8 deletions
|
@ -188,7 +188,7 @@ namespace util
|
|||
std::string bandwidth; i2p::config::GetOption("bandwidth", bandwidth);
|
||||
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]);
|
||||
LogPrint(eLogInfo, "Daemon: Bandwidth set to ", i2p::context.GetBandwidthLimit (), "KBps");
|
||||
|
@ -203,8 +203,8 @@ namespace util
|
|||
}
|
||||
else
|
||||
{
|
||||
LogPrint(eLogInfo, "Daemon: Unexpected bandwidth ", bandwidth, ". Set to 'low'");
|
||||
i2p::context.SetBandwidth (i2p::data::CAPS_FLAG_LOW_BANDWIDTH2);
|
||||
LogPrint(eLogInfo, "Daemon: Unexpected bandwidth ", bandwidth, ". Set to 'O'");
|
||||
i2p::context.SetBandwidth (i2p::data::CAPS_FLAG_HIGH_BANDWIDTH2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -215,8 +215,8 @@ namespace util
|
|||
}
|
||||
else
|
||||
{
|
||||
LogPrint(eLogInfo, "Daemon: bandwidth set to 'low'");
|
||||
i2p::context.SetBandwidth (i2p::data::CAPS_FLAG_LOW_BANDWIDTH2);
|
||||
LogPrint(eLogInfo, "Daemon: bandwidth set to 'O'");
|
||||
i2p::context.SetBandwidth (i2p::data::CAPS_FLAG_HIGH_BANDWIDTH2);
|
||||
}
|
||||
|
||||
int shareRatio; i2p::config::GetOption("share", shareRatio);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue