From 9aae8dadbbbcdd64b090cbf989420a4600c67367 Mon Sep 17 00:00:00 2001
From: Dimitur Kirov <dkirov@gmail.com>
Date: Wed, 3 Aug 2005 21:10:59 +0000
Subject: [PATCH] file transfer port is kept inthe config

---
 src/common/config.py     | 1 +
 src/common/connection.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/common/config.py b/src/common/config.py
index 9573b6052..d5870739c 100644
--- a/src/common/config.py
+++ b/src/common/config.py
@@ -121,6 +121,7 @@ class Config:
 		'print_ichat_every_foo_minutes': [opt_int, 5], # default is every 5 minutes
 		'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
 	}
 
 	__options_per_key = {
diff --git a/src/common/connection.py b/src/common/connection.py
index ba6340aba..0324c78fd 100644
--- a/src/common/connection.py
+++ b/src/common/connection.py
@@ -494,7 +494,7 @@ class Connection:
 	def send_socks5_info(self, file_props):
 		if type(self.peerhost) != tuple:
 			return
-		port = 8011
+		port = gajim.config.get('file_transfers_port')
 		sha_str = self._get_sha(file_props['sid'], file_props['sender'], 
 			file_props['receiver'])
 		file_props['sha_str'] = sha_str