diff options
| author | Edwin Mons <edwin.mons@isode.com> | 2019-11-19 13:36:05 (GMT) |
|---|---|---|
| committer | Edwin Mons <edwin.mons@isode.com> | 2019-11-19 13:58:45 (GMT) |
| commit | 261ba8d8595ed8cb90f9c4feb1d6ef642942bcba (patch) | |
| tree | c7e60d473509db8c4dbff5aa83fbde963d8dd75e /Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp | |
| parent | 697ae6ae84512a744958b24118197ec7bfdbc1f0 (diff) | |
| download | swift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.zip swift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.tar.bz2 | |
Remove std::endl from SWIFT_LOG calls
The std::endl is now added by ~Log, but only for output to stderr or a
log file. Calls to the Android logging system or manually set callbacks
will not include the newline in the logging output.
JIRA: SWIFT-430
Test-Information:
Unit tests pass on Debian 9
Checked that running Swift with logging to stderr still had a newline.
Change-Id: I096fdba78a3b8f87db2097951c28c528592183e8
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp')
| -rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp | 12 |
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 | ||
| 47 | void SOCKS5BytestreamProxiesManager::addS5BProxy(S5BProxyRequest::ref proxy) { | 47 | void 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 | ||
| 64 | void SOCKS5BytestreamProxiesManager::connectToProxies(const std::string& sessionID) { | 64 | void 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 |
Swift