|
|
|
@ -191,7 +191,7 @@ void PeerListWidget::limitUpRateSelectedPeers(QStringList peer_ips) {
@@ -191,7 +191,7 @@ void PeerListWidget::limitUpRateSelectedPeers(QStringList peer_ips) {
|
|
|
|
|
QTorrentHandle h = properties->getCurrentTorrent(); |
|
|
|
|
if(!h.is_valid()) return; |
|
|
|
|
bool ok=false; |
|
|
|
|
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Upload rate limiting"), -1); |
|
|
|
|
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Upload rate limiting"), -1, Preferences::getGlobalUploadLimit()*1024.); |
|
|
|
|
if(!ok) return; |
|
|
|
|
foreach(const QString &ip, peer_ips) { |
|
|
|
|
libtorrent::asio::ip::tcp::endpoint ep = peerEndpoints.value(ip, libtorrent::asio::ip::tcp::endpoint()); |
|
|
|
@ -212,7 +212,7 @@ void PeerListWidget::limitDlRateSelectedPeers(QStringList peer_ips) {
@@ -212,7 +212,7 @@ void PeerListWidget::limitDlRateSelectedPeers(QStringList peer_ips) {
|
|
|
|
|
QTorrentHandle h = properties->getCurrentTorrent(); |
|
|
|
|
if(!h.is_valid()) return; |
|
|
|
|
bool ok=false; |
|
|
|
|
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Download rate limiting"), -1); |
|
|
|
|
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Download rate limiting"), -1, Preferences::getGlobalDownloadLimit()*1024.); |
|
|
|
|
if(!ok) return; |
|
|
|
|
foreach(const QString &ip, peer_ips) { |
|
|
|
|
libtorrent::asio::ip::tcp::endpoint ep = peerEndpoints.value(ip, libtorrent::asio::ip::tcp::endpoint()); |
|
|
|
|