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

View File

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