From: P2P-Next Date: Mon, 20 Sep 2010 09:44:09 +0000 (+0300) Subject: next-share: fix download/upload limit enable code X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=477f9a4ae4dcba4acd4c68e10bc452bc4040e0ca;p=cs-p2p-next.git next-share: fix download/upload limit enable code --- diff --git a/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py b/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py index a6b8cc6..e1f309e 100644 --- a/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py +++ b/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py @@ -124,8 +124,10 @@ def main(): # setup and start download dscfg = DownloadStartupConfig() dscfg.set_dest_dir(output_dir); - dscfg.set_max_speed(DOWNLOAD, download_limit) - dscfg.set_max_speed(UPLOAD, upload_limit) + if download_limit > 0: + dscfg.set_max_speed(DOWNLOAD, download_limit) + if upload_limit > 0: + dscfg.set_max_speed(UPLOAD, upload_limit) if torrentfile_or_url.startswith("http") or torrentfile_or_url.startswith(P2PURL_SCHEME): tdef = TorrentDef.load_from_url(torrentfile_or_url)