mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 04:02:30 +00:00
* Added more logging facilities.
* Ignore logging of alloc/dealloc for chunks during initial hashing. * Moved torrent::ResourceManager to 'src/torrent/peer/' and removed old functions from 'torrent.h'. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1212 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+7
-6
@@ -41,6 +41,7 @@
|
||||
#include <sigc++/adaptors/bind.h>
|
||||
#include <torrent/throttle.h>
|
||||
#include <torrent/torrent.h>
|
||||
#include <torrent/peer/resource_manager.h>
|
||||
|
||||
#include "core/manager.h"
|
||||
#include "display/frame.h"
|
||||
@@ -170,7 +171,7 @@ Root::set_down_throttle(unsigned int throttle) {
|
||||
unsigned int global = std::max<int>(rpc::call_command_value("throttle.max_downloads.global"), 0);
|
||||
|
||||
if (throttle == 0 || div == 0) {
|
||||
torrent::set_max_download_unchoked(global);
|
||||
torrent::resource_manager()->set_max_download_unchoked(global);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,9 +185,9 @@ Root::set_down_throttle(unsigned int throttle) {
|
||||
maxUnchoked = 10 + throttle / 5;
|
||||
|
||||
if (global != 0)
|
||||
torrent::set_max_download_unchoked(std::min(maxUnchoked, global));
|
||||
torrent::resource_manager()->set_max_download_unchoked(std::min(maxUnchoked, global));
|
||||
else
|
||||
torrent::set_max_download_unchoked(maxUnchoked);
|
||||
torrent::resource_manager()->set_max_download_unchoked(maxUnchoked);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -200,7 +201,7 @@ Root::set_up_throttle(unsigned int throttle) {
|
||||
unsigned int global = std::max<int>(rpc::call_command_value("throttle.max_uploads.global"), 0);
|
||||
|
||||
if (throttle == 0 || div == 0) {
|
||||
torrent::set_max_unchoked(global);
|
||||
torrent::resource_manager()->set_max_upload_unchoked(global);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -214,9 +215,9 @@ Root::set_up_throttle(unsigned int throttle) {
|
||||
maxUnchoked = 10 + throttle / 5;
|
||||
|
||||
if (global != 0)
|
||||
torrent::set_max_unchoked(std::min(maxUnchoked, global));
|
||||
torrent::resource_manager()->set_max_upload_unchoked(std::min(maxUnchoked, global));
|
||||
else
|
||||
torrent::set_max_unchoked(maxUnchoked);
|
||||
torrent::resource_manager()->set_max_upload_unchoked(maxUnchoked);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user