* Starting work on merging get/set variable. Moved the bool and value

variables, still might have missed some prior uses that might cause
exceptions to be thrown.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@890 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-04-14 12:43:19 +00:00
parent 4a449bae67
commit 7c121ac049
14 changed files with 470 additions and 115 deletions
+4 -4
View File
@@ -185,14 +185,14 @@ Root::set_down_throttle(unsigned int throttle) {
torrent::set_down_throttle(throttle * 1024);
int64_t div = control->variable()->get_value("max_downloads_div");
int64_t div = control->variable()->get_value("get_max_downloads_div");
if (throttle == 0 || div <= 0) {
torrent::set_max_download_unchoked(m_maxDownloadsGlobal);
return;
}
throttle /= control->variable()->get_value("max_downloads_div");
throttle /= control->variable()->get_value("get_max_downloads_div");
unsigned int maxUnchoked;
@@ -214,14 +214,14 @@ Root::set_up_throttle(unsigned int throttle) {
torrent::set_up_throttle(throttle * 1024);
int64_t div = control->variable()->get_value("max_uploads_div");
int64_t div = control->variable()->get_value("get_max_uploads_div");
if (throttle == 0 || div <= 0) {
torrent::set_max_unchoked(m_maxUploadsGlobal);
return;
}
throttle /= control->variable()->get_value("max_uploads_div");
throttle /= control->variable()->get_value("get_max_uploads_div");
unsigned int maxUnchoked;