summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp')
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp
index cd4cfaa..72c4d41 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp
@@ -5,7 +5,7 @@
5 */ 5 */
6 6
7/* 7/*
8 * Copyright (c) 2015-2016 Isode Limited. 8 * Copyright (c) 2015-2019 Isode Limited.
9 * All rights reserved. 9 * All rights reserved.
10 * See the COPYING file for more information. 10 * See the COPYING file for more information.
11 */ 11 */
@@ -46,7 +46,7 @@ SOCKS5BytestreamProxiesManager::~SOCKS5BytestreamProxiesManager() {
46 46
47void SOCKS5BytestreamProxiesManager::addS5BProxy(S5BProxyRequest::ref proxy) { 47void SOCKS5BytestreamProxiesManager::addS5BProxy(S5BProxyRequest::ref proxy) {
48 if (proxy) { 48 if (proxy) {
49 SWIFT_LOG_ASSERT(HostAddress::fromString(proxy->getStreamHost().get().host), warning) << std::endl; 49 SWIFT_LOG_ASSERT(HostAddress::fromString(proxy->getStreamHost().get().host), warning);
50 if (!localS5BProxies_) { 50 if (!localS5BProxies_) {
51 localS5BProxies_ = std::vector<S5BProxyRequest::ref>(); 51 localS5BProxies_ = std::vector<S5BProxyRequest::ref>();
52 } 52 }
@@ -62,7 +62,7 @@ const boost::optional<std::vector<S5BProxyRequest::ref> >& SOCKS5BytestreamProxi
62} 62}
63 63
64void SOCKS5BytestreamProxiesManager::connectToProxies(const std::string& sessionID) { 64void SOCKS5BytestreamProxiesManager::connectToProxies(const std::string& sessionID) {
65 SWIFT_LOG(debug) << "session ID: " << sessionID << std::endl; 65 SWIFT_LOG(debug) << "session ID: " << sessionID;
66 ProxyJIDClientSessionVector clientSessions; 66 ProxyJIDClientSessionVector clientSessions;
67 67
68 if (localS5BProxies_) { 68 if (localS5BProxies_) {
@@ -71,7 +71,7 @@ void SOCKS5BytestreamProxiesManager::connectToProxies(const std::string& session
71 if (proxyHostAddress) { 71 if (proxyHostAddress) {
72 std::shared_ptr<Connection> conn = connectionFactory_->createConnection(); 72 std::shared_ptr<Connection> conn = connectionFactory_->createConnection();
73 HostAddressPort addressPort = HostAddressPort(proxyHostAddress.get(), proxy->getStreamHost().get().port); 73 HostAddressPort addressPort = HostAddressPort(proxyHostAddress.get(), proxy->getStreamHost().get().port);
74 SWIFT_LOG_ASSERT(addressPort.isValid(), warning) << std::endl; 74 SWIFT_LOG_ASSERT(addressPort.isValid(), warning);
75 std::shared_ptr<SOCKS5BytestreamClientSession> session = std::make_shared<SOCKS5BytestreamClientSession>(conn, addressPort, sessionID, timerFactory_); 75 std::shared_ptr<SOCKS5BytestreamClientSession> session = std::make_shared<SOCKS5BytestreamClientSession>(conn, addressPort, sessionID, timerFactory_);
76 JID proxyJid = proxy->getStreamHost().get().jid; 76 JID proxyJid = proxy->getStreamHost().get().jid;
77 clientSessions.push_back(std::pair<JID, std::shared_ptr<SOCKS5BytestreamClientSession> >(proxyJid, session)); 77 clientSessions.push_back(std::pair<JID, std::shared_ptr<SOCKS5BytestreamClientSession> >(proxyJid, session));
@@ -103,7 +103,7 @@ std::shared_ptr<SOCKS5BytestreamClientSession> SOCKS5BytestreamProxiesManager::g
103 i->second->stop(); 103 i->second->stop();
104 } 104 }
105 } 105 }
106 SWIFT_LOG_ASSERT(activeSession, warning) << "No active session with matching ID found." << std::endl; 106 SWIFT_LOG_ASSERT(activeSession, warning) << "No active session with matching ID found.";
107 107
108 proxySessions_.erase(sessionID); 108 proxySessions_.erase(sessionID);
109 109
@@ -144,7 +144,7 @@ void SOCKS5BytestreamProxiesManager::handleNameLookupResult(const std::vector<Ho
144 } 144 }
145 else { 145 else {
146 if (addresses.empty()) { 146 if (addresses.empty()) {
147 SWIFT_LOG(warning) << "S5B proxy hostname does not resolve." << std::endl; 147 SWIFT_LOG(warning) << "S5B proxy hostname does not resolve.";
148 } 148 }
149 else { 149 else {
150 // generate proxy per returned address 150 // generate proxy per returned address