bind to any
This commit is contained in:
parent
0bb1dd8a5f
commit
fb512e63be
2 changed files with 4 additions and 3 deletions
|
@ -501,6 +501,7 @@ class Connection:
|
|||
listener = gajim.socks5queue.start_listener(self.peerhost[0], port,
|
||||
sha_str, self.result_socks5_sid, file_props['sid'])
|
||||
if listener == None:
|
||||
# FIXME - raise error dialog that address is in use
|
||||
return
|
||||
iq = common.xmpp.Protocol(name = 'iq', to = str(file_props['receiver']),
|
||||
typ = 'set')
|
||||
|
|
|
@ -89,8 +89,8 @@ class SocksQueue:
|
|||
def get_file_props(self, account, sid):
|
||||
if self.files_props.has_key(account):
|
||||
fl_props = self.files_props[account]
|
||||
if fl_props.has_key(id):
|
||||
return fl_props[id]
|
||||
if fl_props.has_key(sid):
|
||||
return fl_props[sid]
|
||||
return None
|
||||
|
||||
def process(self, timeout=0):
|
||||
|
@ -436,7 +436,7 @@ class Socks5Listener:
|
|||
self._serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
self._serv.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||
self._serv.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||
self._serv.bind((self.host, self.port))
|
||||
self._serv.bind(('0.0.0.0', self.port))
|
||||
self._serv.listen(socket.SOMAXCONN)
|
||||
except Exception, (errno, errstr):
|
||||
return None
|
||||
|
|
Loading…
Add table
Reference in a new issue