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/Network/BOSHConnection.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/Network/BOSHConnection.cpp')
| -rw-r--r-- | Swiften/Network/BOSHConnection.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index aaec9f2..1312a3e 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp | |||
| @@ -74,27 +74,27 @@ void BOSHConnection::cancelConnector() { | |||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | void BOSHConnection::handleTLSConnected() { | 76 | void BOSHConnection::handleTLSConnected() { |
| 77 | SWIFT_LOG(debug) << std::endl; | 77 | SWIFT_LOG(debug); |
| 78 | onConnectFinished(false); | 78 | onConnectFinished(false); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void BOSHConnection::handleTLSApplicationDataRead(const SafeByteArray& data) { | 81 | void BOSHConnection::handleTLSApplicationDataRead(const SafeByteArray& data) { |
| 82 | SWIFT_LOG(debug) << std::endl; | 82 | SWIFT_LOG(debug); |
| 83 | handleDataRead(std::make_shared<SafeByteArray>(data)); | 83 | handleDataRead(std::make_shared<SafeByteArray>(data)); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | void BOSHConnection::handleTLSNetowrkDataWriteRequest(const SafeByteArray& data) { | 86 | void BOSHConnection::handleTLSNetowrkDataWriteRequest(const SafeByteArray& data) { |
| 87 | SWIFT_LOG(debug) << std::endl; | 87 | SWIFT_LOG(debug); |
| 88 | connection_->write(data); | 88 | connection_->write(data); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void BOSHConnection::handleRawDataRead(std::shared_ptr<SafeByteArray> data) { | 91 | void BOSHConnection::handleRawDataRead(std::shared_ptr<SafeByteArray> data) { |
| 92 | SWIFT_LOG(debug) << std::endl; | 92 | SWIFT_LOG(debug); |
| 93 | tlsLayer_->handleDataRead(*data.get()); | 93 | tlsLayer_->handleDataRead(*data.get()); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void BOSHConnection::handleTLSError(std::shared_ptr<TLSError> error) { | 96 | void BOSHConnection::handleTLSError(std::shared_ptr<TLSError> error) { |
| 97 | SWIFT_LOG(debug) << (error ? error->getMessage() : "Unknown TLS error") << std::endl; | 97 | SWIFT_LOG(debug) << (error ? error->getMessage() : "Unknown TLS error"); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | void BOSHConnection::writeData(const SafeByteArray& data) { | 100 | void BOSHConnection::writeData(const SafeByteArray& data) { |
| @@ -123,7 +123,7 @@ void BOSHConnection::restartStream() { | |||
| 123 | 123 | ||
| 124 | bool BOSHConnection::setClientCertificate(CertificateWithKey::ref cert) { | 124 | bool BOSHConnection::setClientCertificate(CertificateWithKey::ref cert) { |
| 125 | if (tlsLayer_) { | 125 | if (tlsLayer_) { |
| 126 | SWIFT_LOG(debug) << "set client certificate" << std::endl; | 126 | SWIFT_LOG(debug) << "set client certificate"; |
| 127 | return tlsLayer_->setClientCertificate(cert); | 127 | return tlsLayer_->setClientCertificate(cert); |
| 128 | } | 128 | } |
| 129 | else { | 129 | else { |
| @@ -211,7 +211,7 @@ void BOSHConnection::write(const SafeByteArray& data, bool streamRestart, bool t | |||
| 211 | writeData(safeHeader); | 211 | writeData(safeHeader); |
| 212 | pending_ = true; | 212 | pending_ = true; |
| 213 | 213 | ||
| 214 | SWIFT_LOG(debug) << "write data: " << safeByteArrayToString(safeHeader) << std::endl; | 214 | SWIFT_LOG(debug) << "write data: " << safeByteArrayToString(safeHeader); |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | void BOSHConnection::handleConnectFinished(Connection::ref connection) { | 217 | void BOSHConnection::handleConnectFinished(Connection::ref connection) { |
| @@ -275,7 +275,7 @@ void BOSHConnection::startStream(const std::string& to, unsigned long long rid) | |||
| 275 | SafeByteArray safeHeader = createSafeByteArray(header.str()); | 275 | SafeByteArray safeHeader = createSafeByteArray(header.str()); |
| 276 | onBOSHDataWritten(safeHeader); | 276 | onBOSHDataWritten(safeHeader); |
| 277 | writeData(safeHeader); | 277 | writeData(safeHeader); |
| 278 | SWIFT_LOG(debug) << "write stream header: " << safeByteArrayToString(safeHeader) << std::endl; | 278 | SWIFT_LOG(debug) << "write stream header: " << safeByteArrayToString(safeHeader); |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | void BOSHConnection::handleDataRead(std::shared_ptr<SafeByteArray> data) { | 281 | void BOSHConnection::handleDataRead(std::shared_ptr<SafeByteArray> data) { |
Swift