diff options
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp')
| -rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp index f749735..a6b75da 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp +++ b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp @@ -1,7 +1,7 @@ /* - * Copyright (c) 2012-2016 Isode Limited. + * Copyright (c) 2012-2018 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ /* @@ -112,11 +112,11 @@ void SOCKS5BytestreamServerManager::initialize() { if (state == Start) { state = Initializing; // Find a port to listen on assert(!connectionServer); - int port; + unsigned short port; for (port = LISTEN_PORTS_BEGIN; port < LISTEN_PORTS_END; ++port) { SWIFT_LOG(debug) << "Trying to start server on port " << port << std::endl; connectionServer = connectionServerFactory->createConnectionServer(HostAddress::fromString("::").get(), port); boost::optional<ConnectionServer::Error> error = connectionServer->tryStart(); if (!error) { @@ -162,11 +162,11 @@ void SOCKS5BytestreamServerManager::setupPortForwarding() { boost::bind(&SOCKS5BytestreamServerManager::handleGetPublicIPResult, this, _1)); getPublicIPRequest->start(); } // Forward ports - int port = server->getAddressPort().getPort(); + auto port = server->getAddressPort().getPort(); assert(!forwardPortRequest); portMapping = boost::optional<NATPortMapping>(); if ((forwardPortRequest = natTraverser->createForwardPortRequest(port, port))) { forwardPortRequest->onResult.connect( boost::bind(&SOCKS5BytestreamServerManager::handleForwardPortResult, this, _1)); |
Swift