summaryrefslogtreecommitdiff
path: root/net-p2p
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2004-12-29 03:35:40 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2004-12-29 03:35:40 +0000
commitd3997bd11ea2b14be6d3ec739c7f1fc6995cdea5 (patch)
tree2b975ce26164b679f096aef5b581e9cc01d890a1 /net-p2p
parent- Fix expr usage for 4.x since expr on 4.x (diff)
o Track BitTorrent's codeville development repository
- BitTorrent/Downloader.py: change (self.active_requests vs self.backlog) proportion handling - BitTorrent/download.py: add exception handling around Storage method call o Bump PORTREVISION Obtained from: BitTorrent's codeville repository
Notes
Notes: svn path=/head/; revision=125416
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/py-bittorrent-devel/Makefile2
-rw-r--r--net-p2p/py-bittorrent-devel/files/patch-BitTorrent::Downloader.py11
-rw-r--r--net-p2p/py-bittorrent-devel/files/patch-BitTorrent::download.py15
3 files changed, 27 insertions, 1 deletions
diff --git a/net-p2p/py-bittorrent-devel/Makefile b/net-p2p/py-bittorrent-devel/Makefile
index 8b3a40481538..c31c2dc04295 100644
--- a/net-p2p/py-bittorrent-devel/Makefile
+++ b/net-p2p/py-bittorrent-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.9.0
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= http://www.bittorrent.com/
diff --git a/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::Downloader.py b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::Downloader.py
new file mode 100644
index 000000000000..ad747fe9a9e6
--- /dev/null
+++ b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::Downloader.py
@@ -0,0 +1,11 @@
+--- BitTorrent.orig/Downloader.py Mon Dec 20 20:39:14 2004
++++ BitTorrent/Downloader.py Wed Dec 29 01:13:08 2004
+@@ -205,7 +205,7 @@
+ self.connection.send_interested()
+ self.example_interest = interest
+ self.downloader.picker.requested(interest, self.have.numfalse == 0)
+- while len(self.active_requests) < self.backlog * 2:
++ while len(self.active_requests) < (self.backlog-2) * 5 + 2:
+ begin, length = self.downloader.storage.new_request(interest)
+ self.active_requests.append((interest, begin, length))
+ self.connection.send_request(interest, begin, length)
diff --git a/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::download.py b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::download.py
new file mode 100644
index 000000000000..253d305809a4
--- /dev/null
+++ b/net-p2p/py-bittorrent-devel/files/patch-BitTorrent::download.py
@@ -0,0 +1,15 @@
+--- BitTorrent.orig/download.py Mon Dec 20 20:39:15 2004
++++ BitTorrent/download.py Wed Dec 29 01:13:08 2004
+@@ -144,7 +144,11 @@
+ if filelist:
+ return None
+ return 1
+- s = Storage(None, None, zip(myfiles, metainfo.sizes), check_only=True)
++ try:
++ s = Storage(None, None, zip(myfiles, metainfo.sizes),
++ check_only=True)
++ except:
++ return None
+ filename = os.path.join(config['data_dir'], 'resume',
+ infohash.encode('hex'))
+ try: