diff options
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.cpp')
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.cpp b/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.cpp index 2118782..fc7fe58 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.cpp +++ b/Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.cpp @@ -13,29 +13,29 @@ namespace Swift { SOCKS5BytestreamServerPortForwardingUser::SOCKS5BytestreamServerPortForwardingUser(SOCKS5BytestreamServerManager* s5bServerManager) : s5bServerManager_(s5bServerManager) { - // the server should be initialized, so we know what port to setup a forward for - assert(s5bServerManager->isInitialized()); - if (s5bServerManager_->isPortForwardingReady()) { - onSetup(!s5bServerManager_->getAssistedHostAddressPorts().empty()); - } - else { - onPortForwardingSetupConnection_ = s5bServerManager_->onPortForwardingSetup.connect(boost::bind(&SOCKS5BytestreamServerPortForwardingUser::handleServerManagerPortForwardingSetup, this, _1)); - s5bServerManager_->setupPortForwarding(); - } + // the server should be initialized, so we know what port to setup a forward for + assert(s5bServerManager->isInitialized()); + if (s5bServerManager_->isPortForwardingReady()) { + onSetup(!s5bServerManager_->getAssistedHostAddressPorts().empty()); + } + else { + onPortForwardingSetupConnection_ = s5bServerManager_->onPortForwardingSetup.connect(boost::bind(&SOCKS5BytestreamServerPortForwardingUser::handleServerManagerPortForwardingSetup, this, _1)); + s5bServerManager_->setupPortForwarding(); + } } SOCKS5BytestreamServerPortForwardingUser::~SOCKS5BytestreamServerPortForwardingUser() { - if (s5bServerManager_->isPortForwardingReady()) { - s5bServerManager_->removePortForwarding(); - } + if (s5bServerManager_->isPortForwardingReady()) { + s5bServerManager_->removePortForwarding(); + } } bool SOCKS5BytestreamServerPortForwardingUser::isForwardingSetup() const { - return s5bServerManager_->isPortForwardingReady(); + return s5bServerManager_->isPortForwardingReady(); } void SOCKS5BytestreamServerPortForwardingUser::handleServerManagerPortForwardingSetup(bool successful) { - onSetup(successful); + onSetup(successful); } } |