changeset 98b7d72727b2 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=98b7d72727b2 description: don't forget to send candidate-error when we get only a local IP
diffstat:
src/common/socks5.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
diffs (25 lines):
diff -r 8e78dbd95821 -r 98b7d72727b2 src/common/socks5.py --- a/src/common/socks5.py Thu Aug 30 22:44:26 2012 +0200 +++ b/src/common/socks5.py Thu Aug 30 23:45:35 2012 +0200 @@ -118,14 +118,18 @@ file_props = FilesProp.getFileProp(account, sid) file_props.failure_cb = on_failure con = gajim.connections[account] - if not file_props.streamhosts: - on_failure(file_props.sid) - # add streamhosts to the queue + streamhosts_to_test = [] + # Remove local IPs to not connect to ourself for streamhost in file_props.streamhosts: if streamhost['host'] == '127.0.0.1' or \ streamhost['host'] == '::1' or \ streamhost['host'] == con.peerhost[0]: continue + streamhosts_to_test.append(streamhost) + if not streamhosts_to_test: + on_failure(file_props.sid) + # add streamhosts to the queue + for streamhost in streamhosts_to_test: if 'type' in streamhost and streamhost['type'] == 'proxy': fp = None else: