diff options
author | recht <recht@pkgsrc.org> | 2004-03-12 23:43:05 +0000 |
---|---|---|
committer | recht <recht@pkgsrc.org> | 2004-03-12 23:43:05 +0000 |
commit | eb4cb2627d8dd326edd331c937ef85c7ce3a2d6c (patch) | |
tree | 8413a5c92d2d563fff719d1d10ce538906e0deac /net | |
parent | cff8922d92b7c57c583cd5ccd35c7445a13df0b2 (diff) | |
download | pkgsrc-eb4cb2627d8dd326edd331c937ef85c7ce3a2d6c.tar.gz |
update to 3.4.1
This version fixes lots of bugs, adds more bandwidth savings, and
improves support for peers behind dynamic IPs.
Diffstat (limited to 'net')
-rw-r--r-- | net/bittorrent/Makefile | 3 | ||||
-rw-r--r-- | net/bittorrent/Makefile.common | 4 | ||||
-rw-r--r-- | net/bittorrent/distinfo | 8 | ||||
-rw-r--r-- | net/bittorrent/patches/patch-ac | 57 | ||||
-rw-r--r-- | net/bittorrent/patches/patch-ad | 87 |
5 files changed, 6 insertions, 153 deletions
diff --git a/net/bittorrent/Makefile b/net/bittorrent/Makefile index 505cf3d737b..e2d85e2e7a2 100644 --- a/net/bittorrent/Makefile +++ b/net/bittorrent/Makefile @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.17 2004/03/09 10:26:59 recht Exp $ +# $NetBSD: Makefile,v 1.18 2004/03/12 23:43:05 recht Exp $ # .include "Makefile.common" PKGNAME= ${DISTNAME:S/BitT/bitt/} -PKGREVISION= 1 PYDISTUTILSPKG= YES diff --git a/net/bittorrent/Makefile.common b/net/bittorrent/Makefile.common index ea8e295d5c1..01616f1451b 100644 --- a/net/bittorrent/Makefile.common +++ b/net/bittorrent/Makefile.common @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.common,v 1.2 2004/03/07 21:25:33 recht Exp $ +# $NetBSD: Makefile.common,v 1.3 2004/03/12 23:43:05 recht Exp $ # -DISTNAME= BitTorrent-3.4 +DISTNAME= BitTorrent-3.4.1 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bittorrent/} EXTRACT_SUFX= .zip diff --git a/net/bittorrent/distinfo b/net/bittorrent/distinfo index 88bb838bdce..219c79ce617 100644 --- a/net/bittorrent/distinfo +++ b/net/bittorrent/distinfo @@ -1,8 +1,6 @@ -$NetBSD: distinfo,v 1.8 2004/03/09 10:26:59 recht Exp $ +$NetBSD: distinfo,v 1.9 2004/03/12 23:43:05 recht Exp $ -SHA1 (BitTorrent-3.4.zip) = 58b2a5884bcc71722f6c7332ec6e4b4ec086031e -Size (BitTorrent-3.4.zip) = 242707 bytes +SHA1 (BitTorrent-3.4.1.zip) = 2bbffc518ba23a4f821052bb0ea71135495a729a +Size (BitTorrent-3.4.1.zip) = 244669 bytes SHA1 (patch-aa) = 8c3abb81127bda1594b944fd6e11f587e8477e87 SHA1 (patch-ab) = 186ad86d153bc0c7a3e3234c03ec854b2325cb03 -SHA1 (patch-ac) = 6f95e52ea2dba423e904ebe2364ae44405ebe2f7 -SHA1 (patch-ad) = 9bd7d1e7cdab69a15ffcb98ad41f4840ba11e1e8 diff --git a/net/bittorrent/patches/patch-ac b/net/bittorrent/patches/patch-ac deleted file mode 100644 index 79b9b4cec43..00000000000 --- a/net/bittorrent/patches/patch-ac +++ /dev/null @@ -1,57 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2004/03/09 10:33:22 recht Exp $ - ---- BitTorrent/RawServer.py.orig 2004-02-07 14:35:06.000000000 +0100 -+++ BitTorrent/RawServer.py 2004-03-09 11:11:09.000000000 +0100 -@@ -75,8 +75,12 @@ - else: - self.raw_server.poll.register(self.socket, all) - -+def default_error_handler(x): -+ print x -+ - class RawServer: -- def __init__(self, doneflag, timeout_check_interval, timeout, noisy = True, errorfunc = None, maxconnects = 55): -+ def __init__(self, doneflag, timeout_check_interval, timeout, noisy = True, -+ errorfunc = default_error_handler, maxconnects = 55): - self.timeout_check_interval = timeout_check_interval - self.timeout = timeout - self.poll = poll() -@@ -114,6 +118,10 @@ - if reuse: - server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - server.setblocking(0) -+ try: -+ server.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, 32) -+ except: -+ pass - server.bind((bind, port)) - server.listen(5) - self.poll.register(server, POLLIN) -@@ -147,7 +155,6 @@ - try: - newsock, addr = self.server.accept() - newsock.setblocking(0) -- newsock.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, 32) - if len(self.single_sockets) >= self.maxconnects: - newsock.close() - continue -@@ -224,16 +231,16 @@ - if self.doneflag.isSet(): - return - self._close_dead() -- except error: -+ except error, e: - if self.doneflag.isSet(): - return - # I can't find a coherent explanation for what the behavior should be here, - # and people report conflicting behavior, so I'll just try all the possibilities - try: -- code, msg, desc = error -+ code, msg, desc = e - except: - try: -- code, msg = error -+ code, msg = e - except: - code = ENOBUFS - if code == ENOBUFS: diff --git a/net/bittorrent/patches/patch-ad b/net/bittorrent/patches/patch-ad deleted file mode 100644 index e473e8fe3fc..00000000000 --- a/net/bittorrent/patches/patch-ad +++ /dev/null @@ -1,87 +0,0 @@ -$NetBSD: patch-ad,v 1.1 2004/03/09 10:33:22 recht Exp $ - ---- BitTorrent/track.py.orig 2004-02-26 05:06:06.000000000 +0100 -+++ BitTorrent/track.py 2004-03-09 11:11:03.000000000 +0100 -@@ -148,9 +148,9 @@ - for y, dat in dl.items(): - self.times[x][y] = 0 - if not dat.get('nat',1): -- self.becache1.setdefault(downloadid,{})[y] = Bencached(bencode({'ip': dat['ip'], -+ self.becache1.setdefault(x,{})[y] = Bencached(bencode({'ip': dat['ip'], - 'port': dat['port'], 'peer id': y})) -- self.becache2.setdefault(downloadid,{})[y] = Bencached(bencode({'ip': dat['ip'], -+ self.becache2.setdefault(x,{})[y] = Bencached(bencode({'ip': dat['ip'], - 'port': dat['port']})) - self.reannounce_interval = config['reannounce_interval'] - self.save_dfile_interval = config['save_dfile_interval'] -@@ -351,6 +351,9 @@ - peers[myid] = {'ip': ip, 'port': port, 'left': left, "local_override" : local_override} - else: - peers[myid] = {'ip': ip, 'port': port, 'left': left} -+ if not self.natcheck or local_override: -+ self.becache1.setdefault(infohash,{})[myid] = Bencached(bencode({'ip': ip, 'port': port, 'peer id': myid})) -+ self.becache2.setdefault(infohash,{})[myid] = Bencached(bencode({'ip': ip, 'port': port})) - else: - peers[myid]['left'] = left - if params.get('event', '') == 'completed': -@@ -365,26 +368,25 @@ - peers[myid]['nat'] = 0 - else: - if peers.has_key(myid) and peers[myid]['ip'] == ip: -- if not peers[myid].get('nat',1): -+ try: - del self.becache1[infohash][myid] - del self.becache2[infohash][myid] -+ except KeyError: -+ pass - del peers[myid] - del ts[myid] - data = {'interval': self.reannounce_interval} -- cache1 = self.cache1.setdefault(infohash, []) -- cache2 = self.cache2.setdefault(infohash, []) -- if params.get('no_peer_id',0): -- cache = cache2 -- else: -- cache = cache1 - if rsize > 0: -+ if params.get('no_peer_id', 0): -+ cache = self.cache2.setdefault(infohash, []) -+ b = self.becache2 -+ else: -+ cache = self.cache1.setdefault(infohash, []) -+ b = self.becache1 - if len(cache) < rsize: -- del cache1[:] -- cache1.extend(self.becache1[infohash].values()) -- shuffle(cache1) -- del cache2[:] -- cache2.extend(self.becache2[infohash].values()) -- shuffle(cache2) -+ del cache[:] -+ cache.extend(b.setdefault(infohash, {}).values()) -+ shuffle(cache) - data['peers'] = cache[-rsize:] - del cache[-rsize:] - else: -@@ -403,7 +405,7 @@ - else: - record['nat'] += 1 - if result: -- self.becache1.setdefault(downloadid,{})[peerid] = Bencached(bencode({'ip': ip, 'port': port, 'peer id': myid})) -+ self.becache1.setdefault(downloadid,{})[peerid] = Bencached(bencode({'ip': ip, 'port': port, 'peer id': peerid})) - self.becache2.setdefault(downloadid,{})[peerid] = Bencached(bencode({'ip': ip, 'port': port})) - - def save_dfile(self): -@@ -420,9 +422,11 @@ - for x in self.times.keys(): - for myid, t in self.times[x].items(): - if t < self.prevtime: -- if not self.downloads[x][myid].get('nat',1): -+ try: - del self.becache1[x][myid] - del self.becache2[x][myid] -+ except KeyError: -+ pass - del self.times[x][myid] - del self.downloads[x][myid] - self.prevtime = time() |