don't crash when we get wrong streamhost. Fixes #6983

This commit is contained in:
Yann Leboulanger 2011-09-23 19:01:42 +02:00
parent 08a584b8b6
commit de54f52805
1 changed files with 6 additions and 0 deletions

View File

@ -597,6 +597,12 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
}
for attr in item.getAttrs():
host_dict[attr] = item.getAttr(attr)
if 'host' not in host_dict:
continue
if 'jid' not in host_dict:
continue
if 'port' not in host_dict:
continue
streamhosts.append(host_dict)
if file_props is None:
if sid in self.files_props: