This remove unused keyword
--line, and those below, will be ignored-- M socks5.py M connection_handlers.py
This commit is contained in:
parent
124f1c641e
commit
470e668ea2
|
@ -175,7 +175,7 @@ class ConnectionBytestream:
|
||||||
except socket.gaierror:
|
except socket.gaierror:
|
||||||
self.dispatch('ERROR', (_('Wrong host'), _('The host you configured as the ft_override_host_to_send advanced option is not valid, so ignored.')))
|
self.dispatch('ERROR', (_('Wrong host'), _('The host you configured as the ft_override_host_to_send advanced option is not valid, so ignored.')))
|
||||||
ft_override_host_to_send = self.peerhost[0]
|
ft_override_host_to_send = self.peerhost[0]
|
||||||
listener = gajim.socks5queue.start_listener(self.peerhost[0], port,
|
listener = gajim.socks5queue.start_listener(port,
|
||||||
sha_str, self._result_socks5_sid, file_props['sid'])
|
sha_str, self._result_socks5_sid, file_props['sid'])
|
||||||
if listener == None:
|
if listener == None:
|
||||||
file_props['error'] = -5
|
file_props['error'] = -5
|
||||||
|
|
|
@ -74,13 +74,13 @@ class SocksQueue:
|
||||||
self.on_success = None
|
self.on_success = None
|
||||||
self.on_failure = None
|
self.on_failure = None
|
||||||
|
|
||||||
def start_listener(self, host, port, sha_str, sha_handler, sid):
|
def start_listener(self, port, sha_str, sha_handler, sid):
|
||||||
''' start waiting for incomming connections on (host, port)
|
''' start waiting for incomming connections on (host, port)
|
||||||
and do a socks5 authentication using sid for generated sha
|
and do a socks5 authentication using sid for generated sha
|
||||||
'''
|
'''
|
||||||
self.sha_handlers[sha_str] = (sha_handler, sid)
|
self.sha_handlers[sha_str] = (sha_handler, sid)
|
||||||
if self.listener == None:
|
if self.listener == None:
|
||||||
self.listener = Socks5Listener(self.idlequeue, host, port)
|
self.listener = Socks5Listener(self.idlequeue, port)
|
||||||
self.listener.queue = self
|
self.listener.queue = self
|
||||||
self.listener.bind()
|
self.listener.bind()
|
||||||
if self.listener.started is False:
|
if self.listener.started is False:
|
||||||
|
@ -790,12 +790,12 @@ class Socks5Sender(Socks5, IdleObject):
|
||||||
self.queue.remove_sender(self.queue_idx, False)
|
self.queue.remove_sender(self.queue_idx, False)
|
||||||
|
|
||||||
class Socks5Listener(IdleObject):
|
class Socks5Listener(IdleObject):
|
||||||
def __init__(self, idlequeue, host, port):
|
def __init__(self, idlequeue, port):
|
||||||
''' handle all incomming connections on (host, port)
|
''' handle all incomming connections on (0.0.0.0, port)
|
||||||
This class implements IdleObject, but we will expect
|
This class implements IdleObject, but we will expect
|
||||||
only pollin events though
|
only pollin events though
|
||||||
'''
|
'''
|
||||||
self.host, self.port = host, port
|
self.port = port
|
||||||
self.queue_idx = -1
|
self.queue_idx = -1
|
||||||
self.idlequeue = idlequeue
|
self.idlequeue = idlequeue
|
||||||
self.queue = None
|
self.queue = None
|
||||||
|
|
Loading…
Reference in New Issue