* Finished refactoring command_network.cc.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1152 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-03-23 18:24:18 +00:00
parent 28aabb7874
commit db2b813fc4
7 changed files with 131 additions and 94 deletions
+4 -4
View File
@@ -166,8 +166,8 @@ Root::set_down_throttle(unsigned int throttle) {
torrent::down_throttle_global()->set_max_rate(throttle * 1024);
unsigned int div = std::max<int>(rpc::call_command_value("get_max_downloads_div"), 0);
unsigned int global = std::max<int>(rpc::call_command_value("get_max_downloads_global"), 0);
unsigned int div = std::max<int>(rpc::call_command_value("max_downloads_div"), 0);
unsigned int global = std::max<int>(rpc::call_command_value("max_downloads_global"), 0);
if (throttle == 0 || div == 0) {
torrent::set_max_download_unchoked(global);
@@ -196,8 +196,8 @@ Root::set_up_throttle(unsigned int throttle) {
torrent::up_throttle_global()->set_max_rate(throttle * 1024);
unsigned int div = std::max<int>(rpc::call_command_value("get_max_uploads_div"), 0);
unsigned int global = std::max<int>(rpc::call_command_value("get_max_uploads_global"), 0);
unsigned int div = std::max<int>(rpc::call_command_value("max_uploads_div"), 0);
unsigned int global = std::max<int>(rpc::call_command_value("max_uploads_global"), 0);
if (throttle == 0 || div == 0) {
torrent::set_max_unchoked(global);