better name: ft_override_host_to_send

This commit is contained in:
Nikos Kouremenos 2005-08-12 13:40:42 +00:00
parent fcf2fc4c09
commit 0855c48d08
2 changed files with 6 additions and 6 deletions

View File

@ -128,8 +128,8 @@ class Config:
'confirm_close_muc': [opt_bool, True], # confirm closing MUC window
'notify_on_file_complete': [opt_bool, True], # notif. on file complete
'file_transfers_port': [opt_int, 28011], # port, used for file transfers
# custom host in case user did address translation/port forward
'ft_custom_host': [opt_str, ''],
# override the host we send for FT in case of address translation/port forward
'ft_override_host_to_send': [opt_str, ''],
'conversation_font': [opt_str, ''],
# IEC standard says KiB = 1024 bytes KB = 1000 bytes
'use_kib_mib': [opt_bool, False],

View File

@ -716,7 +716,7 @@ class Connection:
if type(self.peerhost) != tuple:
return
port = gajim.config.get('file_transfers_port')
custom_host = gajim.config.get('ft_custom_host')
ft_override_host_to_send = gajim.config.get('ft_override_host_to_send')
cfg_proxies = gajim.config.get_per('accounts', self.name, 'file_transfer_proxies')
if receiver is None:
receiver = file_props['receiver']
@ -743,8 +743,8 @@ class Connection:
sha_str = self._get_sha(file_props['sid'], sender,
receiver)
file_props['sha_str'] = sha_str
if not custom_host:
custom_host = self.peerhost[0]
if not ft_override_host_to_send:
ft_override_host_to_send = self.peerhost[0]
listener = gajim.socks5queue.start_listener(self.peerhost[0], port,
sha_str, self.result_socks5_sid, file_props['sid'])
if listener == None:
@ -761,7 +761,7 @@ class Connection:
query.setAttr('sid', file_props['sid'])
streamhost = query.setTag('streamhost')
streamhost.setAttr('port', str(port))
streamhost.setAttr('host', custom_host)
streamhost.setAttr('host', ft_override_host_to_send)
streamhost.setAttr('jid', sender)
if fast and proxyhosts != []:
file_props['proxy_receiver'] = str(receiver)