diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff')
-rw-r--r-- | net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff b/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff new file mode 100644 index 000000000000..5cf39c311a82 --- /dev/null +++ b/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff @@ -0,0 +1,107 @@ +diff -r bdbcba80e0fa Hellanzb/NZBLeecher/Protocol.py +--- a/Hellanzb/NZBLeecher/Protocol.py Wed Nov 14 10:00:29 2007 +0100 ++++ b/Hellanzb/NZBLeecher/Protocol.py Thu Nov 22 22:32:04 2007 +0100 +@@ -27,18 +27,14 @@ PHI = 1.6180339887498948 # (1 + math.sqr + PHI = 1.6180339887498948 # (1 + math.sqrt(5)) / 2 + class NZBLeecherFactory(ReconnectingClientFactory): + +- def __init__(self, username, password, activeTimeout, antiIdleTimeout, hostname, ++ def __init__(self, username, password, activeTimeout, antiIdleTimeout, + serverPoolName, skipGroupCmd, fillServerPriority = 0, color = None): + self.username = username + self.password = password + self.antiIdleTimeout = antiIdleTimeout + self.activeTimeout = activeTimeout +- self.hostname = hostname + self.serverPoolName = serverPoolName + self.fillServerPriority = fillServerPriority +- +- self.host = None +- self.port = None + + # statistics for the current session (sessions end when downloading stops on all + # clients). sessionReadBytes and sessionStartime are used to calculate the average +@@ -88,6 +84,7 @@ class NZBLeecherFactory(ReconnectingClie + p.factory = self + p.id = self.clientIds[0] + self.clientIds.remove(p.id) ++ p.host, p.port = addr.host, addr.port + + # All clients inherit the factory's anti idle timeout setting + # FIXME: I don't think there's any reason to copy these values to the +@@ -323,7 +320,7 @@ class NZBLeecher(NNTPClient, TimeoutMixi + "Override for notification when authInfoFailed() action fails" + debug(str(self) + ' AUTHINFO failed: ' + str(err)) + # FIXME: This gives us too much scroll. Need to only do it selectively +- #error(self.factory.hostname + '[' + str(self.id).zfill(2) + '] Authorization failed: ' + str(err)) ++ #error(self.host + '[' + str(self.id).zfill(2) + '] Authorization failed: ' + str(err)) + self.transport.loseConnection() + + def connectionMade(self): +@@ -428,7 +425,7 @@ class NZBLeecher(NNTPClient, TimeoutMixi + login """ + if self.username == None and self.password == None: + warn('Could not MODE READER on no auth server (%s:%i), returned: %s' % \ +- (self.factory.host, self.factory.port, str(err))) ++ (self.host, self.port, str(err))) + reactor.callLater(0, self.fetchNextNZBSegment) + elif not self.isLoggedIn: + self.setReaderAfterLogin = True +diff -r bdbcba80e0fa Hellanzb/NZBLeecher/__init__.py +--- a/Hellanzb/NZBLeecher/__init__.py Wed Nov 14 10:00:29 2007 +0100 ++++ b/Hellanzb/NZBLeecher/__init__.py Thu Nov 22 22:32:04 2007 +0100 +@@ -122,30 +122,28 @@ def connectServer(serverName, serverDict + connectionCount = 0 + hosts = serverDict['hosts'] + connections = int(serverDict['connections']) ++ antiIdle = int(setWithDefault(serverDict, 'antiIdle', defaultAntiIdle)) ++ idleTimeout = int(setWithDefault(serverDict, 'idleTimeout', defaultIdleTimeout)) ++ skipGroupCmd = setWithDefault(serverDict, 'skipGroupCmd', False) ++ fillServer = setWithDefault(serverDict, 'fillserver', 0) ++ useSSL = setWithDefault(serverDict, 'ssl', False) ++ ++ nsf = NZBLeecherFactory(serverDict['username'], serverDict['password'], ++ idleTimeout, antiIdle, serverName, skipGroupCmd, ++ fillServer) ++ color = nsf.color ++ Hellanzb.nsfs.append(nsf) ++ ++ preWrappedNsf = nsf ++ nsf = HellaThrottlingFactory(nsf) + + for host in hosts: +- antiIdle = int(setWithDefault(serverDict, 'antiIdle', defaultAntiIdle)) +- idleTimeout = int(setWithDefault(serverDict, 'idleTimeout', defaultIdleTimeout)) +- skipGroupCmd = setWithDefault(serverDict, 'skipGroupCmd', False) +- fillServer = setWithDefault(serverDict, 'fillserver', 0) +- useSSL = setWithDefault(serverDict, 'ssl', False) +- +- nsf = NZBLeecherFactory(serverDict['username'], serverDict['password'], +- idleTimeout, antiIdle, host, serverName, skipGroupCmd, +- fillServer) +- color = nsf.color +- Hellanzb.nsfs.append(nsf) +- + split = host.split(':') + host = split[0] + if len(split) == 2: + port = int(split[1]) + else: + port = 119 +- nsf.host, nsf.port = host, port +- +- preWrappedNsf = nsf +- nsf = HellaThrottlingFactory(nsf) + + ctxf = None + if useSSL: +@@ -195,7 +193,8 @@ def connectServer(serverName, serverDict + if antiIdle == 0: + preWrappedNsf.leecherConnectors.append(connector) + connectionCount += 1 +- preWrappedNsf.setConnectionCount(connectionCount) ++ ++ preWrappedNsf.setConnectionCount(connectionCount) + + if antiIdle == 0: + action = '' |