specify seed and download torrent limits separately

This commit is contained in:
Arvid Norberg 2011-03-16 04:46:14 +00:00
parent 2f7dea83ee
commit 4c45d84160
1 changed files with 8 additions and 5 deletions

View File

@ -913,7 +913,8 @@ int main(int argc, char* argv[])
" -W <num peers> Set the max number of peers to keep in the peer list\n" " -W <num peers> Set the max number of peers to keep in the peer list\n"
" -N Do not attempt to use UPnP and NAT-PMP to forward ports\n" " -N Do not attempt to use UPnP and NAT-PMP to forward ports\n"
" -Y Rate limit local peers\n" " -Y Rate limit local peers\n"
" -v <limit> Set the max number of active torrents\n" " -v <limit> Set the max number of active downloads\n"
" -^ <limit> Set the max number of active seeds\n"
" -y Disable TCP connections (disable outgoing TCP and reject\n" " -y Disable TCP connections (disable outgoing TCP and reject\n"
" incoming TCP connections)\n" " incoming TCP connections)\n"
" -q <num loops> automatically quit the client after <num loops> of refreshes\n" " -q <num loops> automatically quit the client after <num loops> of refreshes\n"
@ -1128,10 +1129,12 @@ int main(int argc, char* argv[])
case 'I': outgoing_interface = arg; break; case 'I': outgoing_interface = arg; break;
case 'N': start_upnp = false; --i; break; case 'N': start_upnp = false; --i; break;
case 'Y': settings.ignore_limits_on_local_network = false; --i; break; case 'Y': settings.ignore_limits_on_local_network = false; --i; break;
case 'v': case 'v': settings.active_downloads = atoi(arg);
settings.active_limit = atoi(arg); settings.active_limit = (std::max)(atoi(arg) * 2, settings.active_limit);
settings.active_downloads = atoi(arg) / 2; break;
settings.active_seeds = atoi(arg) / 2; case '^':
settings.active_seeds = atoi(arg);
settings.active_limit = (std::max)(atoi(arg) * 2, settings.active_limit);
break; break;
case 'q': loop_limit = atoi(arg); break; case 'q': loop_limit = atoi(arg); break;
} }