From 2dea5f2ff8d897e03c7f0959bff4c01e6de98f17 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 17 Jul 2007 11:26:49 +0000 Subject: [PATCH] - Fixed a bug in speed allocation per torrent. Libtorrent works better too but I'm still hitting an assert. --- src/allocationDlg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allocationDlg.h b/src/allocationDlg.h index e71d014d0..08dbb8929 100644 --- a/src/allocationDlg.h +++ b/src/allocationDlg.h @@ -56,9 +56,9 @@ class BandwidthAllocationDialog : public QDialog, private Ui_bandwidth_dlg { if(nbTorrents == 1){ torrent_handle h = BTSession->getTorrentHandle(hashes.at(0)); if(uploadMode) - val = h.upload_limit(); + val = (int)(h.upload_limit() / 1024.); else - val = h.download_limit(); + val = (int)(h.download_limit() / 1024.); qDebug("Bandwidth limit: %d", val); if(val > bandwidthSlider->maximum() || val < bandwidthSlider->minimum()) val = -1;