summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--QA/Checker/checker.cpp4
-rw-r--r--Slimber/Server.cpp4
-rw-r--r--Sluift/ElementConvertors/DefaultElementConvertor.cpp4
-rw-r--r--SwifTools/Application/ApplicationPathProvider.cpp4
-rw-r--r--SwifTools/Application/MacOSXApplicationPathProvider.cpp4
-rw-r--r--SwifTools/Application/UnixApplicationPathProvider.cpp4
-rw-r--r--SwifTools/AutoUpdater/SparkleAutoUpdater.mm4
-rw-r--r--SwifTools/AutoUpdater/SparkleAutoUpdaterDelegate.mm6
-rw-r--r--SwifTools/CrashReporter.cpp4
-rw-r--r--SwifTools/HunspellChecker.cpp4
-rw-r--r--SwifTools/Notifier/NotificationCenterNotifier.mm4
-rw-r--r--Swift/Controllers/AccountController.cpp6
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp12
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp12
-rw-r--r--Swift/Controllers/Chat/MUCSearchController.cpp12
-rw-r--r--Swift/Controllers/FileTransfer/FileTransferController.cpp6
-rw-r--r--Swift/Controllers/Highlighting/HighlightManager.cpp4
-rw-r--r--Swift/Controllers/Settings/XMLSettingsProvider.cpp10
-rw-r--r--Swift/Controllers/StatusCache.cpp8
-rw-r--r--Swift/Controllers/Storages/AvatarFileStorage.cpp14
-rw-r--r--Swift/Controllers/Storages/CertificateFileStorage.cpp6
-rw-r--r--Swift/QtUI/CAPICertificateSelector.cpp12
-rw-r--r--Swift/QtUI/QtAboutWidget.cpp4
-rw-r--r--Swift/QtUI/QtScaledAvatarCache.cpp8
-rw-r--r--Swift/QtUI/QtSpellCheckerWindow.cpp4
-rw-r--r--Swift/QtUI/QtSwift.cpp8
-rw-r--r--Swift/QtUI/QtTextEdit.cpp4
-rw-r--r--Swift/QtUI/QtUIFactory.cpp6
-rw-r--r--Swift/QtUI/QtWebKitChatView.cpp18
-rw-r--r--Swift/QtUI/Trellis/QtDynamicGridLayout.cpp8
-rw-r--r--Swiften/Avatars/CombinedAvatarProvider.cpp8
-rw-r--r--Swiften/Avatars/VCardUpdateAvatarManager.cpp10
-rw-r--r--Swiften/Base/DateTime.cpp4
-rw-r--r--Swiften/Base/Log.cpp17
-rw-r--r--Swiften/Client/ClientSession.cpp8
-rw-r--r--Swiften/Client/ClientSessionStanzaChannel.cpp4
-rw-r--r--Swiften/Client/CoreClient.cpp32
-rw-r--r--Swiften/Component/ComponentSessionStanzaChannel.cpp4
-rw-r--r--Swiften/Component/CoreComponent.cpp4
-rw-r--r--Swiften/Disco/CapsManager.cpp4
-rw-r--r--Swiften/Disco/DiscoServiceWalker.cpp18
-rw-r--r--Swiften/Entity/PayloadPersister.cpp6
-rw-r--r--Swiften/EventLoop/DummyEventLoop.cpp2
-rw-r--r--Swiften/EventLoop/EventLoop.cpp4
-rw-r--r--Swiften/Examples/SendFile/ReceiveFile.cpp4
-rw-r--r--Swiften/FileTransfer/DefaultFileTransferTransporter.cpp12
-rw-r--r--Swiften/FileTransfer/FailingTransportSession.cpp4
-rw-r--r--Swiften/FileTransfer/FileTransferManagerImpl.cpp4
-rw-r--r--Swiften/FileTransfer/IncomingJingleFileTransfer.cpp68
-rw-r--r--Swiften/FileTransfer/JingleFileTransfer.cpp50
-rw-r--r--Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp6
-rw-r--r--Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp62
-rw-r--r--Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp8
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp34
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp12
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.cpp6
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp30
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerSession.cpp24
-rw-r--r--Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp6
-rw-r--r--Swiften/Jingle/AbstractJingleSessionListener.cpp16
-rw-r--r--Swiften/Jingle/JingleResponder.cpp8
-rw-r--r--Swiften/Jingle/JingleSessionImpl.cpp6
-rw-r--r--Swiften/Jingle/JingleSessionManager.cpp4
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp4
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h8
-rw-r--r--Swiften/LinkLocal/LinkLocalServiceInfo.cpp4
-rw-r--r--Swiften/Network/BOSHConnection.cpp16
-rw-r--r--Swiften/Network/BOSHConnectionPool.cpp4
-rw-r--r--Swiften/Network/BoostConnection.cpp8
-rw-r--r--Swiften/Network/BoostConnectionServer.cpp4
-rw-r--r--Swiften/Network/ChainedConnector.cpp10
-rw-r--r--Swiften/Network/Connector.cpp26
-rw-r--r--Swiften/Network/EnvironmentProxyProvider.cpp4
-rw-r--r--Swiften/Network/GConfProxyProvider.cpp4
-rw-r--r--Swiften/Network/HTTPConnectProxiedConnection.cpp12
-rw-r--r--Swiften/Network/HostAddress.cpp4
-rw-r--r--Swiften/Network/NATPMPInterface.cpp14
-rw-r--r--Swiften/Network/PlatformDomainNameServiceQuery.cpp6
-rw-r--r--Swiften/Network/PlatformNATTraversalWorker.cpp4
-rw-r--r--Swiften/Network/ProxiedConnection.cpp4
-rw-r--r--Swiften/Network/SOCKS5ProxiedConnection.cpp14
-rw-r--r--Swiften/Network/UnboundDomainNameResolver.cpp26
-rw-r--r--Swiften/Network/UnitTest/HTTPConnectProxiedConnectionTest.cpp6
-rw-r--r--Swiften/Network/WindowsProxyProvider.cpp4
-rw-r--r--Swiften/Parser/IQParser.cpp4
-rw-r--r--Swiften/Parser/LibXMLParser.cpp2
-rw-r--r--Swiften/Parser/PresenceParser.cpp4
-rw-r--r--Swiften/Roster/XMPPRosterController.cpp4
-rw-r--r--Swiften/SASL/WindowsAuthentication.cpp34
-rw-r--r--Swiften/SASL/WindowsGSSAPIClientAuthenticator.cpp24
-rw-r--r--Swiften/SASL/WindowsServicePrincipalName.cpp20
-rw-r--r--Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/ReferencePayloadSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp4
-rw-r--r--Swiften/Serializer/StanzaSerializer.cpp4
-rw-r--r--Swiften/Serializer/XMPPSerializer.cpp4
-rw-r--r--Swiften/StreamManagement/StanzaAckRequester.cpp4
-rw-r--r--Swiften/StreamStack/WhitespacePingLayer.cpp4
-rw-r--r--Swiften/TLS/CAPICertificate.cpp26
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp4
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContext.cpp24
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp4
-rw-r--r--Swiften/TLS/Schannel/SchannelContext.cpp12
-rw-r--r--Swiften/TLS/SecureTransport/SecureTransportContext.mm68
-rw-r--r--Swiften/TLS/SecureTransport/SecureTransportContextFactory.cpp4
105 files changed, 575 insertions, 572 deletions
diff --git a/QA/Checker/checker.cpp b/QA/Checker/checker.cpp
index f4ec6f1..4d6a90e 100644
--- a/QA/Checker/checker.cpp
+++ b/QA/Checker/checker.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2017 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -143,3 +143,3 @@ int main(int argc, char* argv[]) {
googleTestWasSuccessful = false;
- SWIFT_LOG(error) << "GoogleTestFailureException was thrown: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "GoogleTestFailureException was thrown: " << e.what();
}
diff --git a/Slimber/Server.cpp b/Slimber/Server.cpp
index bfa34f5..7bb2ed9 100644
--- a/Slimber/Server.cpp
+++ b/Slimber/Server.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -308,3 +308,3 @@ void Server::handleConnectFinished(std::shared_ptr<LinkLocalConnector> connector
if (error) {
- SWIFT_LOG(warning) << "Error connecting" << std::endl;
+ SWIFT_LOG(warning) << "Error connecting";
// TODO: Send back queued stanzas
diff --git a/Sluift/ElementConvertors/DefaultElementConvertor.cpp b/Sluift/ElementConvertors/DefaultElementConvertor.cpp
index 75e6706..d3d60ff 100644
--- a/Sluift/ElementConvertors/DefaultElementConvertor.cpp
+++ b/Sluift/ElementConvertors/DefaultElementConvertor.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -22,3 +22,3 @@ DefaultElementConvertor::~DefaultElementConvertor() {
std::shared_ptr<Element> DefaultElementConvertor::convertFromLua(lua_State*, int, const std::string& type) {
- SWIFT_LOG(warning) << "Unable to convert type '" << type << "'" << std::endl;
+ SWIFT_LOG(warning) << "Unable to convert type '" << type << "'";
return std::shared_ptr<Element>();
diff --git a/SwifTools/Application/ApplicationPathProvider.cpp b/SwifTools/Application/ApplicationPathProvider.cpp
index 8b952bb..77457ef 100644
--- a/SwifTools/Application/ApplicationPathProvider.cpp
+++ b/SwifTools/Application/ApplicationPathProvider.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -27,3 +27,3 @@ boost::filesystem::path ApplicationPathProvider::getProfileDir(const std::string
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << e.what() << std::endl;
+ SWIFT_LOG(error) << e.what();
}
diff --git a/SwifTools/Application/MacOSXApplicationPathProvider.cpp b/SwifTools/Application/MacOSXApplicationPathProvider.cpp
index 684d8b2..d7b99b9 100644
--- a/SwifTools/Application/MacOSXApplicationPathProvider.cpp
+++ b/SwifTools/Application/MacOSXApplicationPathProvider.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -25,3 +25,3 @@ boost::filesystem::path MacOSXApplicationPathProvider::getDataDir() const {
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << e.what() << std::endl;
+ SWIFT_LOG(error) << e.what();
}
diff --git a/SwifTools/Application/UnixApplicationPathProvider.cpp b/SwifTools/Application/UnixApplicationPathProvider.cpp
index e455d23..a345766 100644
--- a/SwifTools/Application/UnixApplicationPathProvider.cpp
+++ b/SwifTools/Application/UnixApplicationPathProvider.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -56,3 +56,3 @@ boost::filesystem::path UnixApplicationPathProvider::getDataDir() const {
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << "file system error: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "file system error: " << e.what();
}
diff --git a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
index b4a4c05..274ab3c 100644
--- a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
+++ b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2016-2017 Isode Limited.
+ * Copyright (c) 2016-2019 Isode Limited.
* All rights reserved.
@@ -48,3 +48,3 @@ SparkleAutoUpdater::SparkleAutoUpdater(const std::string& appcastFeed) : d(new P
"The current running user has enough permissions to do a silent update." :
- "The current running user has insufficient permissions to do a silent update.") << std::endl;
+ "The current running user has insufficient permissions to do a silent update.");
diff --git a/SwifTools/AutoUpdater/SparkleAutoUpdaterDelegate.mm b/SwifTools/AutoUpdater/SparkleAutoUpdaterDelegate.mm
index be58355..b9294d9 100644
--- a/SwifTools/AutoUpdater/SparkleAutoUpdaterDelegate.mm
+++ b/SwifTools/AutoUpdater/SparkleAutoUpdaterDelegate.mm
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2016-2017 Isode Limited.
+ * Copyright (c) 2016-2019 Isode Limited.
* All rights reserved.
@@ -51,3 +51,3 @@ using namespace Swift;
(void)item;
- SWIFT_LOG(error) << ns2StdString([error localizedDescription]) << std::endl;
+ SWIFT_LOG(error) << ns2StdString([error localizedDescription]);
onNewUpdateState(AutoUpdater::State::ErrorCheckingForUpdate);
@@ -73,3 +73,3 @@ using namespace Swift;
else {
- SWIFT_LOG(error) << ns2StdString([error localizedDescription]) << std::endl;
+ SWIFT_LOG(error) << ns2StdString([error localizedDescription]);
onNewUpdateState(AutoUpdater::State::ErrorCheckingForUpdate);
diff --git a/SwifTools/CrashReporter.cpp b/SwifTools/CrashReporter.cpp
index bf637c8..b02e73b 100644
--- a/SwifTools/CrashReporter.cpp
+++ b/SwifTools/CrashReporter.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2012-2016 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
@@ -48,3 +48,3 @@ CrashReporter::CrashReporter(const boost::filesystem::path& path, const std::str
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << "ERROR: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "ERROR: " << e.what();
}
diff --git a/SwifTools/HunspellChecker.cpp b/SwifTools/HunspellChecker.cpp
index 1de369b..019a4dc 100644
--- a/SwifTools/HunspellChecker.cpp
+++ b/SwifTools/HunspellChecker.cpp
@@ -86,3 +86,3 @@ void HunspellChecker::setActiveLanguage(const std::string& language) {
if (dictionaries.find(language) != dictionaries.end()) {
- SWIFT_LOG(debug) << "Initialized Hunspell with dic,aff files " << dictionaries[language].dicPath << " , " << dictionaries[language].affPath << std::endl;
+ SWIFT_LOG(debug) << "Initialized Hunspell with dic,aff files " << dictionaries[language].dicPath << " , " << dictionaries[language].affPath;
speller_ = std::unique_ptr<Hunspell>(new Hunspell(dictionaries[language].affPath.c_str(), dictionaries[language].dicPath.c_str()));
@@ -91,3 +91,3 @@ void HunspellChecker::setActiveLanguage(const std::string& language) {
else {
- SWIFT_LOG(warning) << "Unsupported language '" << language << "'" << std::endl;
+ SWIFT_LOG(warning) << "Unsupported language '" << language << "'";
}
diff --git a/SwifTools/Notifier/NotificationCenterNotifier.mm b/SwifTools/Notifier/NotificationCenterNotifier.mm
index 1538186..e6fdfb6 100644
--- a/SwifTools/Notifier/NotificationCenterNotifier.mm
+++ b/SwifTools/Notifier/NotificationCenterNotifier.mm
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -90,3 +90,3 @@ void NotificationCenterNotifier::handleUserNotificationActivated(const std::stri
else {
- SWIFT_LOG(warning) << "Missing callback entry for activated notification. The activate notification may come from another instance." << std::endl;
+ SWIFT_LOG(warning) << "Missing callback entry for activated notification. The activate notification may come from another instance.";
}
diff --git a/Swift/Controllers/AccountController.cpp b/Swift/Controllers/AccountController.cpp
index b877ce9..a257cc4 100644
--- a/Swift/Controllers/AccountController.cpp
+++ b/Swift/Controllers/AccountController.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -783,6 +783,6 @@ void AccountController::enableMessageCarbons() {
if (error) {
- SWIFT_LOG(warning) << "Failed to enable carbons." << std::endl;
+ SWIFT_LOG(warning) << "Failed to enable carbons.";
}
else {
- SWIFT_LOG(debug) << "Successfully enabled carbons." << std::endl;
+ SWIFT_LOG(debug) << "Successfully enabled carbons.";
}
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index 5f441f8..debd83f 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -192,3 +192,3 @@ void ChatController::preHandleIncomingMessage(std::shared_ptr<MessageEvent> mess
if (std::shared_ptr<DeliveryReceipt> receipt = message->getPayload<DeliveryReceipt>()) {
- SWIFT_LOG(debug) << "received receipt for id: " << receipt->getReceivedID() << std::endl;
+ SWIFT_LOG(debug) << "received receipt for id: " << receipt->getReceivedID();
if (requestedReceipts_.find(receipt->getReceivedID()) != requestedReceipts_.end()) {
@@ -409,3 +409,3 @@ void ChatController::handleWhiteboardStateChange(const ChatWindow::WhiteboardSes
void ChatController::handleFileTransferCancel(std::string id) {
- SWIFT_LOG(debug) << "handleFileTransferCancel(" << id << ")" << std::endl;
+ SWIFT_LOG(debug) << "handleFileTransferCancel(" << id << ")";
if (ftControllers.find(id) != ftControllers.end()) {
@@ -418,3 +418,3 @@ void ChatController::handleFileTransferCancel(std::string id) {
void ChatController::handleFileTransferStart(std::string id, std::string description) {
- SWIFT_LOG(debug) << "handleFileTransferStart(" << id << ", " << description << ")" << std::endl;
+ SWIFT_LOG(debug) << "handleFileTransferStart(" << id << ", " << description << ")";
if (ftControllers.find(id) != ftControllers.end()) {
@@ -427,3 +427,3 @@ void ChatController::handleFileTransferStart(std::string id, std::string descrip
void ChatController::handleFileTransferAccept(std::string id, std::string filename) {
- SWIFT_LOG(debug) << "handleFileTransferAccept(" << id << ", " << filename << ")" << std::endl;
+ SWIFT_LOG(debug) << "handleFileTransferAccept(" << id << ", " << filename << ")";
if (ftControllers.find(id) != ftControllers.end()) {
@@ -436,3 +436,3 @@ void ChatController::handleFileTransferAccept(std::string id, std::string filena
void ChatController::handleSendFileRequest(std::string filename) {
- SWIFT_LOG(debug) << "ChatController::handleSendFileRequest(" << filename << ")" << std::endl;
+ SWIFT_LOG(debug) << "ChatController::handleSendFileRequest(" << filename << ")";
eventStream_->send(std::make_shared<SendFileUIEvent>(getToJID(), filename));
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index 6530a7e..193af7f 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -177,3 +177,3 @@ ChatsManager::~ChatsManager() {
delete joinMUCWindow_;
- SWIFT_LOG(debug) << "Destroying ChatsManager, containing " << chatControllers_.size() << " chats and " << mucControllers_.size() << " MUCs" << std::endl;
+ SWIFT_LOG(debug) << "Destroying ChatsManager, containing " << chatControllers_.size() << " chats and " << mucControllers_.size() << " MUCs";
for (JIDChatControllerPair controllerPair : chatControllers_) {
@@ -313,3 +313,3 @@ void ChatsManager::loadRecents() {
} catch (const boost::archive::archive_exception& e) {
- SWIFT_LOG(debug) << "Failed to load recents: " << e.what() << std::endl;
+ SWIFT_LOG(debug) << "Failed to load recents: " << e.what();
return;
@@ -938,3 +938,3 @@ void ChatsManager::handleUserNicknameChanged(MUCController* mucController, const
- SWIFT_LOG(debug) << "nickname change in " << mucController->getToJID().toString() << " from " << oldNickname << " to " << newNickname << std::endl;
+ SWIFT_LOG(debug) << "nickname change in " << mucController->getToJID().toString() << " from " << oldNickname << " to " << newNickname;
@@ -985,3 +985,3 @@ void ChatsManager::handleIncomingMessage(std::shared_ptr<Message> incomingMessag
else {
- SWIFT_LOG(error) << "Carbons message ignored." << std::endl;
+ SWIFT_LOG(error) << "Carbons message ignored.";
}
@@ -1143,3 +1143,3 @@ void ChatsManager::handleLocalServiceFound(const JID& service, std::shared_ptr<D
localMUCServiceFinderWalker_->endWalk();
- SWIFT_LOG(debug) << "Use following MUC service for impromptu chats: " << localMUCServiceJID_ << std::endl;
+ SWIFT_LOG(debug) << "Use following MUC service for impromptu chats: " << localMUCServiceJID_;
break;
diff --git a/Swift/Controllers/Chat/MUCSearchController.cpp b/Swift/Controllers/Chat/MUCSearchController.cpp
index 5db917a..0b54d25 100644
--- a/Swift/Controllers/Chat/MUCSearchController.cpp
+++ b/Swift/Controllers/Chat/MUCSearchController.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -94,3 +94,3 @@ void MUCSearchController::handleSearchService(const JID& jid) {
- SWIFT_LOG(debug) << "Starting walking MUC services" << std::endl;
+ SWIFT_LOG(debug) << "Starting walking MUC services";
itemsInProgress_ = 0;
@@ -115,3 +115,3 @@ void MUCSearchController::handleDiscoServiceFound(const JID& jid, std::shared_pt
if (isMUC) {
- SWIFT_LOG(debug) << "MUC Service found: " << jid << std::endl;
+ SWIFT_LOG(debug) << "MUC Service found: " << jid;
services_.erase(std::remove(services_.begin(), services_.end(), jid), services_.end());
@@ -122,3 +122,3 @@ void MUCSearchController::handleDiscoServiceFound(const JID& jid, std::shared_pt
itemsInProgress_++;
- SWIFT_LOG(debug) << "Requesting items of " << jid << " (" << itemsInProgress_ << " item requests in progress)" << std::endl;
+ SWIFT_LOG(debug) << "Requesting items of " << jid << " (" << itemsInProgress_ << " item requests in progress)";
GetDiscoItemsRequest::ref discoItemsRequest = GetDiscoItemsRequest::create(jid, iqRouter_);
@@ -134,3 +134,3 @@ void MUCSearchController::handleDiscoServiceFound(const JID& jid, std::shared_pt
void MUCSearchController::handleDiscoWalkFinished() {
- SWIFT_LOG(debug) << "MUC Walk finished" << std::endl;
+ SWIFT_LOG(debug) << "MUC Walk finished";
updateInProgressness();
@@ -146,3 +146,3 @@ void MUCSearchController::handleRoomsItemsResponse(std::shared_ptr<DiscoItems> i
itemsInProgress_--;
- SWIFT_LOG(debug) << "Items received for " << jid << " (" << itemsInProgress_ << " item requests in progress)" << std::endl;
+ SWIFT_LOG(debug) << "Items received for " << jid << " (" << itemsInProgress_ << " item requests in progress)";
updateInProgressness();
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.cpp b/Swift/Controllers/FileTransfer/FileTransferController.cpp
index 27e9dbf..5b86a7b 100644
--- a/Swift/Controllers/FileTransfer/FileTransferController.cpp
+++ b/Swift/Controllers/FileTransfer/FileTransferController.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2015-2017 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -84,3 +84,3 @@ boost::uintmax_t FileTransferController::getSize() const {
void FileTransferController::start(std::string& description) {
- SWIFT_LOG(debug) << "FileTransferController::start" << std::endl;
+ SWIFT_LOG(debug) << "FileTransferController::start";
fileReadStream = std::make_shared<FileReadBytestream>(boost::filesystem::path(filename));
@@ -100,3 +100,3 @@ void FileTransferController::start(std::string& description) {
void FileTransferController::accept(std::string& file) {
- SWIFT_LOG(debug) << "FileTransferController::accept" << std::endl;
+ SWIFT_LOG(debug) << "FileTransferController::accept";
IncomingFileTransfer::ref incomingTransfer = std::dynamic_pointer_cast<IncomingFileTransfer>(transfer);
diff --git a/Swift/Controllers/Highlighting/HighlightManager.cpp b/Swift/Controllers/Highlighting/HighlightManager.cpp
index 2ca77e7..f09d94c 100644
--- a/Swift/Controllers/Highlighting/HighlightManager.cpp
+++ b/Swift/Controllers/Highlighting/HighlightManager.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2014-2017 Isode Limited.
+ * Copyright (c) 2014-2019 Isode Limited.
* All rights reserved.
@@ -87,3 +87,3 @@ HighlightConfiguration HighlightManager::highlightConfigurationFromString(const
configuration = getDefaultConfig();
- SWIFT_LOG(warning) << "Failed to load highlight configuration. Will use default configuration instead." << std::endl;
+ SWIFT_LOG(warning) << "Failed to load highlight configuration. Will use default configuration instead.";
}
diff --git a/Swift/Controllers/Settings/XMLSettingsProvider.cpp b/Swift/Controllers/Settings/XMLSettingsProvider.cpp
index f1049f1..a316cef 100644
--- a/Swift/Controllers/Settings/XMLSettingsProvider.cpp
+++ b/Swift/Controllers/Settings/XMLSettingsProvider.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2012-2016 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
@@ -22,6 +22,6 @@ XMLSettingsProvider::XMLSettingsProvider(const std::string& xmlConfig) : level_(
if (parser->parse(xmlConfig)) {
- SWIFT_LOG(debug) << "Found and parsed system config" << std::endl;
+ SWIFT_LOG(debug) << "Found and parsed system config";
}
else {
- SWIFT_LOG(debug) << "Found invalid system config" << std::endl;
+ SWIFT_LOG(debug) << "Found invalid system config";
}
@@ -29,3 +29,3 @@ XMLSettingsProvider::XMLSettingsProvider(const std::string& xmlConfig) : level_(
else {
- SWIFT_LOG(debug) << "No system config found" << std::endl;
+ SWIFT_LOG(debug) << "No system config found";
}
@@ -112,3 +112,3 @@ void XMLSettingsProvider::handleEndElement(const std::string& /*element*/, const
values_[currentElement_] = currentText_;
- SWIFT_LOG(debug) << "Setting value of " << currentElement_ << " to " << currentText_ << std::endl;
+ SWIFT_LOG(debug) << "Setting value of " << currentElement_ << " to " << currentText_;
}
diff --git a/Swift/Controllers/StatusCache.cpp b/Swift/Controllers/StatusCache.cpp
index 3c6baed..f9196f6 100644
--- a/Swift/Controllers/StatusCache.cpp
+++ b/Swift/Controllers/StatusCache.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2012-2016 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
@@ -78,3 +78,3 @@ void StatusCache::loadRecents() {
catch (const boost::bad_lexical_cast& e) {
- SWIFT_LOG(error) << "Failed to load recent status cache entry: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "Failed to load recent status cache entry: " << e.what();
}
@@ -84,3 +84,3 @@ void StatusCache::loadRecents() {
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << "Failed to load recents: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "Failed to load recents: " << e.what();
}
@@ -102,3 +102,3 @@ void StatusCache::saveRecents() {
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << "Failed to save recents: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "Failed to save recents: " << e.what();
}
diff --git a/Swift/Controllers/Storages/AvatarFileStorage.cpp b/Swift/Controllers/Storages/AvatarFileStorage.cpp
index 9d9b9ea..808c432 100644
--- a/Swift/Controllers/Storages/AvatarFileStorage.cpp
+++ b/Swift/Controllers/Storages/AvatarFileStorage.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -32,3 +32,3 @@ AvatarFileStorage::AvatarFileStorage(const boost::filesystem::path& avatarsDir,
else if (!r.first.empty() || !r.second.empty()) {
- SWIFT_LOG(error) << "Invalid entry in avatars file: " << r.second << std::endl;
+ SWIFT_LOG(error) << "Invalid entry in avatars file: " << r.second;
}
@@ -38,3 +38,3 @@ AvatarFileStorage::AvatarFileStorage(const boost::filesystem::path& avatarsDir,
catch (...) {
- SWIFT_LOG(error) << "Error reading avatars file" << std::endl;
+ SWIFT_LOG(error) << "Error reading avatars file";
}
@@ -56,3 +56,3 @@ void AvatarFileStorage::addAvatar(const std::string& hash, const ByteArray& avat
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << "filesystem error: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "filesystem error: " << e.what();
}
@@ -65,3 +65,3 @@ void AvatarFileStorage::addAvatar(const std::string& hash, const ByteArray& avat
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << "filesystem error: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "filesystem error: " << e.what();
}
@@ -79,3 +79,3 @@ ByteArray AvatarFileStorage::getAvatar(const std::string& hash) const {
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << "filesystem error: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "filesystem error: " << e.what();
}
@@ -109,3 +109,3 @@ void AvatarFileStorage::saveJIDAvatars() {
catch (...) {
- SWIFT_LOG(error) << "Error writing avatars file" << std::endl;
+ SWIFT_LOG(error) << "Error writing avatars file";
}
diff --git a/Swift/Controllers/Storages/CertificateFileStorage.cpp b/Swift/Controllers/Storages/CertificateFileStorage.cpp
index 2e1343f..a8661df 100644
--- a/Swift/Controllers/Storages/CertificateFileStorage.cpp
+++ b/Swift/Controllers/Storages/CertificateFileStorage.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -33,3 +33,3 @@ bool CertificateFileStorage::hasCertificate(Certificate::ref certificate) const
else {
- SWIFT_LOG(warning) << "Stored certificate does not match received certificate" << std::endl;
+ SWIFT_LOG(warning) << "Stored certificate does not match received certificate";
return false;
@@ -59,3 +59,3 @@ void CertificateFileStorage::addCertificate(Certificate::ref certificate) {
catch (...) {
- SWIFT_LOG(warning) << "Failed to store certificate to " << certificatePath << std::endl;
+ SWIFT_LOG(warning) << "Failed to store certificate to " << certificatePath;
}
diff --git a/Swift/QtUI/CAPICertificateSelector.cpp b/Swift/QtUI/CAPICertificateSelector.cpp
index e47121b..7e4bc0b 100644
--- a/Swift/QtUI/CAPICertificateSelector.cpp
+++ b/Swift/QtUI/CAPICertificateSelector.cpp
@@ -82,7 +82,7 @@ std::string selectCAPICertificate() {
switch (error) {
- case ERROR_INSUFFICIENT_BUFFER: SWIFT_LOG(error) << "Insufficient buffer for rendering cert dialog" << std::endl;break;
- case ERROR_INVALID_FLAGS: SWIFT_LOG(error) << "Invalid flags for rendering cert dialog" << std::endl;break;
- case ERROR_INVALID_PARAMETER: SWIFT_LOG(error) << "Invalid parameter for rendering cert dialog" << std::endl;break;
- case ERROR_NO_UNICODE_TRANSLATION: SWIFT_LOG(error) << "Invalid unicode for rendering cert dialog" << std::endl;break;
- default: SWIFT_LOG(error) << "Unexpected multibyte conversion errorcode" << std::endl;
+ case ERROR_INSUFFICIENT_BUFFER: SWIFT_LOG(error) << "Insufficient buffer for rendering cert dialog"; break;
+ case ERROR_INVALID_FLAGS: SWIFT_LOG(error) << "Invalid flags for rendering cert dialog"; break;
+ case ERROR_INVALID_PARAMETER: SWIFT_LOG(error) << "Invalid parameter for rendering cert dialog"; break;
+ case ERROR_NO_UNICODE_TRANSLATION: SWIFT_LOG(error) << "Invalid unicode for rendering cert dialog"; break;
+ default: SWIFT_LOG(error) << "Unexpected multibyte conversion errorcode";
@@ -105,3 +105,3 @@ std::string selectCAPICertificate() {
if (CertCloseStore(hstore, 0) == FALSE) {
- SWIFT_LOG(debug) << "Failed to close the certificate store handle." << std::endl;
+ SWIFT_LOG(debug) << "Failed to close the certificate store handle.";
}
diff --git a/Swift/QtUI/QtAboutWidget.cpp b/Swift/QtUI/QtAboutWidget.cpp
index 2db0c9d..0a4e0ba 100644
--- a/Swift/QtUI/QtAboutWidget.cpp
+++ b/Swift/QtUI/QtAboutWidget.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2017 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -152,3 +152,3 @@ void QtAboutWidget::openPlainTextWindow(const QString& path) {
else {
- SWIFT_LOG(error) << "Failed to open " << Q2PSTRING(path) << "." << std::endl;
+ SWIFT_LOG(error) << "Failed to open " << Q2PSTRING(path) << ".";
}
diff --git a/Swift/QtUI/QtScaledAvatarCache.cpp b/Swift/QtUI/QtScaledAvatarCache.cpp
index 37ea6a9..e3a28d6 100644
--- a/Swift/QtUI/QtScaledAvatarCache.cpp
+++ b/Swift/QtUI/QtScaledAvatarCache.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -55,4 +55,4 @@ QString QtScaledAvatarCache::getScaledAvatarPath(const QString& path) {
if (!avatarFile.dir().mkpath(cacheSubPath)) {
- SWIFT_LOG(error) << "avatarFile.dir(): " << Q2PSTRING(avatarFile.dir().absolutePath()) << std::endl;
- SWIFT_LOG(error) << "Failed creating cache folder: " << Q2PSTRING(cacheSubPath) << std::endl;
+ SWIFT_LOG(error) << "avatarFile.dir(): " << Q2PSTRING(avatarFile.dir().absolutePath());
+ SWIFT_LOG(error) << "Failed creating cache folder: " << Q2PSTRING(cacheSubPath);
return path;
@@ -77,3 +77,3 @@ QString QtScaledAvatarCache::getScaledAvatarPath(const QString& path) {
} else {
- SWIFT_LOG(warning) << "Failed to load " << Q2PSTRING(path) << std::endl;
+ SWIFT_LOG(warning) << "Failed to load " << Q2PSTRING(path);
}
diff --git a/Swift/QtUI/QtSpellCheckerWindow.cpp b/Swift/QtUI/QtSpellCheckerWindow.cpp
index a8178c4..23b0963 100644
--- a/Swift/QtUI/QtSpellCheckerWindow.cpp
+++ b/Swift/QtUI/QtSpellCheckerWindow.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2016 Isode Limited.
+ * Copyright (c) 2016-2019 Isode Limited.
* All rights reserved.
@@ -66,3 +66,3 @@ void QtSpellCheckerWindow::setSupportedLanguages(const std::vector<std::string>&
void QtSpellCheckerWindow::setActiveLanguage(const std::string& language) {
- SWIFT_LOG_ASSERT(languageItems_.find(language) != languageItems_.end(), warning) << "Language '" << language << "' is not available." << std::endl;
+ SWIFT_LOG_ASSERT(languageItems_.find(language) != languageItems_.end(), warning) << "Language '" << language << "' is not available.";
if (languageItems_.find(language) != languageItems_.end()) {
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index f1ad38e..73fd733 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -193,3 +193,3 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa
catch (...) {
- SWIFT_LOG(error) << "Error while retrieving the specified log file name from the command line" << std::endl;
+ SWIFT_LOG(error) << "Error while retrieving the specified log file name from the command line";
}
@@ -224,3 +224,3 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa
int error = QFontDatabase::addApplicationFont(P2QSTRING(fontPath));
- SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath << std::endl;
+ SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath;
}
@@ -230,3 +230,3 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa
int error = QFontDatabase::addApplicationFont(P2QSTRING(fontPath));
- SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath << std::endl;
+ SWIFT_LOG_ASSERT(error != -1, error) << "Failed to load font " << fontPath;
QFont::insertSubstitution(QApplication::font().family(),"NotoColorEmoji");
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp
index e63cd4f..b3c57a7 100644
--- a/Swift/QtUI/QtTextEdit.cpp
+++ b/Swift/QtUI/QtTextEdit.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2017 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -242,3 +242,3 @@ void QtTextEdit::setUpSpellChecker() {
// Spellchecking is not working, as we did not get a valid checker from the factory. Disable spellchecking.
- SWIFT_LOG(warning) << "Spellchecking is currently misconfigured in Swift (e.g. missing dictionary or broken dictionary file). Disable spellchecking." << std::endl;
+ SWIFT_LOG(warning) << "Spellchecking is currently misconfigured in Swift (e.g. missing dictionary or broken dictionary file). Disable spellchecking.";
settings_->storeSetting(QtUISettingConstants::SPELL_CHECKER, false);
diff --git a/Swift/QtUI/QtUIFactory.cpp b/Swift/QtUI/QtUIFactory.cpp
index 93fca5f..49f55dd 100644
--- a/Swift/QtUI/QtUIFactory.cpp
+++ b/Swift/QtUI/QtUIFactory.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -51,5 +51,5 @@ QtUIFactory::QtUIFactory(SettingsProviderHierachy* settings, QtSettingsProvider*
QtUIFactory::~QtUIFactory() {
- SWIFT_LOG(debug) << "Entering QtUIFactory destructor. chatWindows size:" << chatWindows_.size() << std::endl;
+ SWIFT_LOG(debug) << "Entering QtUIFactory destructor. chatWindows size:" << chatWindows_.size();
for (auto chat : chatWindows_) {
- SWIFT_LOG_ASSERT(chat.isNull(), debug) << "QtUIFactory has active chat windows and has not been reset properly" << std::endl;
+ SWIFT_LOG_ASSERT(chat.isNull(), debug) << "QtUIFactory has active chat windows and has not been reset properly";
}
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp
index bca9e2e..75a23f8 100644
--- a/Swift/QtUI/QtWebKitChatView.cpp
+++ b/Swift/QtUI/QtWebKitChatView.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -143,3 +143,3 @@ void QtWebKitChatView::addMessageTop(std::shared_ptr<ChatSnippet> /* snippet */)
// TODO: Implement this in a sensible manner later.
- SWIFT_LOG(error) << "Not yet implemented!" << std::endl;
+ SWIFT_LOG(error) << "Not yet implemented!";
}
@@ -386,3 +386,3 @@ void QtWebKitChatView::setFileTransferProgress(QString id, const int percentageD
if (ftElement.isNull()) {
- SWIFT_LOG(debug) << "Tried to access FT UI via invalid id!" << std::endl;
+ SWIFT_LOG(debug) << "Tried to access FT UI via invalid id!";
return;
@@ -400,3 +400,3 @@ void QtWebKitChatView::setFileTransferStatus(QString id, const ChatWindow::FileT
if (ftElement.isNull()) {
- SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl;
+ SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id);
return;
@@ -485,3 +485,3 @@ void QtWebKitChatView::resetTopInsertPoint() {
// TODO: Implement or refactor later.
- SWIFT_LOG(error) << "Not yet implemented!" << std::endl;
+ SWIFT_LOG(error) << "Not yet implemented!";
}
@@ -626,3 +626,3 @@ void QtWebKitChatView::resizeEvent(QResizeEvent* event) {
std::string QtWebKitChatView::addFileTransfer(const std::string& senderName, const std::string& avatarPath, bool senderIsSelf, const std::string& filename, const boost::uintmax_t sizeInBytes, const std::string& description) {
- SWIFT_LOG(debug) << "addFileTransfer" << std::endl;
+ SWIFT_LOG(debug) << "addFileTransfer";
QString ft_id = QString("ft%1").arg(P2QSTRING(boost::lexical_cast<std::string>(idCounter_++)));
@@ -728,3 +728,3 @@ void QtWebKitChatView::setFileTransferWarning(QString id, QString warningText) {
if (ftElement.isNull()) {
- SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl;
+ SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id);
return;
@@ -739,3 +739,3 @@ void QtWebKitChatView::removeFileTransferWarning(QString id) {
if (ftElement.isNull()) {
- SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl;
+ SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id);
return;
@@ -831,3 +831,3 @@ void QtWebKitChatView::handleHTMLButtonClicked(QString id, QString encodedArgume
else {
- SWIFT_LOG(debug) << "Unknown HTML button! ( " << Q2PSTRING(id) << " )" << std::endl;
+ SWIFT_LOG(debug) << "Unknown HTML button! ( " << Q2PSTRING(id) << " )";
}
diff --git a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
index 2402529..53e2733 100644
--- a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
+++ b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2019 Isode Limited.
* All rights reserved.
@@ -516,5 +516,5 @@ void QtDynamicGridLayout::moveTab(QtTabWidget* tabWidget, int oldIndex, int newI
#if QT_VERSION >= 0x040500
- SWIFT_LOG_ASSERT(movingTab_ == nullptr, error) << std::endl;
+ SWIFT_LOG_ASSERT(movingTab_ == nullptr, error);
movingTab_ = qobject_cast<QtTabbable*>(tabWidget->widget(oldIndex));
- SWIFT_LOG_ASSERT(movingTab_ != nullptr, error) << std::endl;
+ SWIFT_LOG_ASSERT(movingTab_ != nullptr, error);
@@ -528,3 +528,3 @@ void QtDynamicGridLayout::moveTab(QtTabWidget* tabWidget, int oldIndex, int newI
qApp->removeEventFilter(this);
- SWIFT_LOG_ASSERT(movingTab_ == tabWidget->widget(newIndex), error) << std::endl;
+ SWIFT_LOG_ASSERT(movingTab_ == tabWidget->widget(newIndex), error);
}
diff --git a/Swiften/Avatars/CombinedAvatarProvider.cpp b/Swiften/Avatars/CombinedAvatarProvider.cpp
index 465512f..ba6e6be 100644
--- a/Swiften/Avatars/CombinedAvatarProvider.cpp
+++ b/Swiften/Avatars/CombinedAvatarProvider.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -41,3 +41,3 @@ void CombinedAvatarProvider::handleAvatarChanged(const JID& jid) {
if (newHash != oldHash) {
- SWIFT_LOG(debug) << "Avatar changed: " << jid << ": " << oldHash << " -> " << (newHash ? newHash.get() : "NULL") << std::endl;
+ SWIFT_LOG(debug) << "Avatar changed: " << jid << ": " << oldHash << " -> " << (newHash ? newHash.get() : "NULL");
onAvatarChanged(jid);
@@ -47,3 +47,3 @@ void CombinedAvatarProvider::handleAvatarChanged(const JID& jid) {
boost::optional<std::string> CombinedAvatarProvider::getCombinedAvatarAndCache(const JID& jid) const {
- SWIFT_LOG(debug) << "JID: " << jid << std::endl;
+ SWIFT_LOG(debug) << "JID: " << jid;
boost::optional<std::string> hash;
@@ -51,3 +51,3 @@ boost::optional<std::string> CombinedAvatarProvider::getCombinedAvatarAndCache(c
hash = providers[i]->getAvatarHash(jid);
- SWIFT_LOG(debug) << "Provider " << providers[i] << ": " << (hash ? hash.get() : "NULL") << std::endl;
+ SWIFT_LOG(debug) << "Provider " << providers[i] << ": " << (hash ? hash.get() : "NULL");
}
diff --git a/Swiften/Avatars/VCardUpdateAvatarManager.cpp b/Swiften/Avatars/VCardUpdateAvatarManager.cpp
index 349af2f..d04c13c 100644
--- a/Swiften/Avatars/VCardUpdateAvatarManager.cpp
+++ b/Swiften/Avatars/VCardUpdateAvatarManager.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -35,3 +35,3 @@ void VCardUpdateAvatarManager::handlePresenceReceived(std::shared_ptr<Presence>
if (update->getPhotoHash().size() != 40) {
- SWIFT_LOG(debug) << "Invalid vCard avatar photo hash length. Must be hex-encoded SHA-1, i.e. 40 characters." << std::endl;
+ SWIFT_LOG(debug) << "Invalid vCard avatar photo hash length. Must be hex-encoded SHA-1, i.e. 40 characters.";
return;
@@ -41,3 +41,3 @@ void VCardUpdateAvatarManager::handlePresenceReceived(std::shared_ptr<Presence>
}
- SWIFT_LOG(debug) << "Updated hash: " << from << " -> " << update->getPhotoHash() << std::endl;
+ SWIFT_LOG(debug) << "Updated hash: " << from << " -> " << update->getPhotoHash();
if (avatarStorage_->hasAvatar(update->getPhotoHash())) {
@@ -52,3 +52,3 @@ void VCardUpdateAvatarManager::handleVCardChanged(const JID& from, VCard::ref vC
if (!vCard) {
- SWIFT_LOG(debug) << "Missing element: " << from << ": null vcard payload" << std::endl;
+ SWIFT_LOG(debug) << "Missing element: " << from << ": null vcard payload";
return;
@@ -69,3 +69,3 @@ void VCardUpdateAvatarManager::handleVCardChanged(const JID& from, VCard::ref vC
void VCardUpdateAvatarManager::setAvatarHash(const JID& from, const std::string& hash) {
- SWIFT_LOG(debug) << "Updating hash: " << from << " -> " << hash << std::endl;
+ SWIFT_LOG(debug) << "Updating hash: " << from << " -> " << hash;
avatarHashes_[from] = hash;
diff --git a/Swiften/Base/DateTime.cpp b/Swiften/Base/DateTime.cpp
index 4443566..23b3b84 100644
--- a/Swiften/Base/DateTime.cpp
+++ b/Swiften/Base/DateTime.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -42,3 +42,3 @@ std::string dateTimeToLocalString(const boost::posix_time::ptime& time) {
catch(std::out_of_range& exception) {
- SWIFT_LOG(debug) << exception.what() << std::endl;
+ SWIFT_LOG(debug) << exception.what();
}
diff --git a/Swiften/Base/Log.cpp b/Swiften/Base/Log.cpp
index abfd2bc..b6f1851 100644
--- a/Swiften/Base/Log.cpp
+++ b/Swiften/Base/Log.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -32,9 +32,12 @@ Log::~Log() {
}
- else if (logfile) {
- fwrite(stream.str().c_str(), sizeof(char), stream.str().size(), logfile.get());
- fflush(logfile.get());
- }
else {
- fwrite(stream.str().c_str(), sizeof(char), stream.str().size(), stderr);
- fflush(stderr);
+ stream << std::endl;
+ if (logfile) {
+ fwrite(stream.str().c_str(), sizeof(char), stream.str().size(), logfile.get());
+ fflush(logfile.get());
+ }
+ else {
+ fwrite(stream.str().c_str(), sizeof(char), stream.str().size(), stderr);
+ fflush(stderr);
+ }
}
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp
index 4e34417..1114336 100644
--- a/Swiften/Client/ClientSession.cpp
+++ b/Swiften/Client/ClientSession.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -90,3 +90,3 @@ ClientSession::ClientSession(
if (WindowsRegistry::isFIPSEnabled()) {
- SWIFT_LOG(info) << "Windows is running in FIPS-140 mode. Some authentication methods will be unavailable." << std::endl;
+ SWIFT_LOG(info) << "Windows is running in FIPS-140 mode. Some authentication methods will be unavailable.";
}
@@ -533,3 +533,3 @@ void ClientSession::finish() {
else {
- SWIFT_LOG(warning) << "Session already finished or finishing." << std::endl;
+ SWIFT_LOG(warning) << "Session already finished or finishing.";
}
@@ -546,3 +546,3 @@ void ClientSession::finishSession(std::shared_ptr<Swift::Error> error) {
else {
- SWIFT_LOG(warning) << "Session finished twice" << std::endl;
+ SWIFT_LOG(warning) << "Session finished twice";
}
diff --git a/Swiften/Client/ClientSessionStanzaChannel.cpp b/Swiften/Client/ClientSessionStanzaChannel.cpp
index f48b306..6a5d07d 100644
--- a/Swiften/Client/ClientSessionStanzaChannel.cpp
+++ b/Swiften/Client/ClientSessionStanzaChannel.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -51,3 +51,3 @@ void ClientSessionStanzaChannel::send(std::shared_ptr<Stanza> stanza) {
if (!isAvailable()) {
- SWIFT_LOG(warning) << "Client: Trying to send a stanza while disconnected." << std::endl;
+ SWIFT_LOG(warning) << "Client: Trying to send a stanza while disconnected.";
return;
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index ccde0c2..7579bca 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -71,8 +71,8 @@ void CoreClient::connect(const ClientOptions& o) {
case ClientOptions::NoProxy:
- SWIFT_LOG(debug) << " without a proxy" << std::endl;
+ SWIFT_LOG(debug) << " without a proxy";
break;
case ClientOptions::SystemConfiguredProxy:
- SWIFT_LOG(debug) << " with a system configured proxy" << std::endl;
+ SWIFT_LOG(debug) << " with a system configured proxy";
if (systemSOCKS5Proxy.isValid()) {
- SWIFT_LOG(debug) << "Found SOCK5 Proxy: " << systemSOCKS5Proxy.getAddress().toString() << ":" << systemSOCKS5Proxy.getPort() << std::endl;
+ SWIFT_LOG(debug) << "Found SOCK5 Proxy: " << systemSOCKS5Proxy.getAddress().toString() << ":" << systemSOCKS5Proxy.getPort();
proxyConnectionFactories.push_back(new SOCKS5ProxiedConnectionFactory(networkFactories->getDomainNameResolver(), networkFactories->getConnectionFactory(), networkFactories->getTimerFactory(), systemSOCKS5Proxy.getAddress().toString(), systemSOCKS5Proxy.getPort()));
@@ -80,3 +80,3 @@ void CoreClient::connect(const ClientOptions& o) {
if (systemHTTPConnectProxy.isValid()) {
- SWIFT_LOG(debug) << "Found HTTPConnect Proxy: " << systemHTTPConnectProxy.getAddress().toString() << ":" << systemHTTPConnectProxy.getPort() << std::endl;
+ SWIFT_LOG(debug) << "Found HTTPConnect Proxy: " << systemHTTPConnectProxy.getAddress().toString() << ":" << systemHTTPConnectProxy.getPort();
proxyConnectionFactories.push_back(new HTTPConnectProxiedConnectionFactory(networkFactories->getDomainNameResolver(), networkFactories->getConnectionFactory(), networkFactories->getTimerFactory(), systemHTTPConnectProxy.getAddress().toString(), systemHTTPConnectProxy.getPort()));
@@ -85,3 +85,3 @@ void CoreClient::connect(const ClientOptions& o) {
case ClientOptions::SOCKS5Proxy: {
- SWIFT_LOG(debug) << " with manual configured SOCKS5 proxy" << std::endl;
+ SWIFT_LOG(debug) << " with manual configured SOCKS5 proxy";
std::string proxyHostname = o.manualProxyHostname.empty() ? systemSOCKS5Proxy.getAddress().toString() : o.manualProxyHostname;
@@ -93,3 +93,3 @@ void CoreClient::connect(const ClientOptions& o) {
catch (const boost::numeric::bad_numeric_cast& e) {
- SWIFT_LOG(warning) << "Manual proxy port " << o.manualProxyPort << " is invalid: " << e.what() << std::endl;
+ SWIFT_LOG(warning) << "Manual proxy port " << o.manualProxyPort << " is invalid: " << e.what();
onDisconnected(boost::optional<ClientError>(ClientError::ConnectionError));
@@ -98,3 +98,3 @@ void CoreClient::connect(const ClientOptions& o) {
}
- SWIFT_LOG(debug) << "Proxy: " << proxyHostname << ":" << proxyPort << std::endl;
+ SWIFT_LOG(debug) << "Proxy: " << proxyHostname << ":" << proxyPort;
proxyConnectionFactories.push_back(new SOCKS5ProxiedConnectionFactory(networkFactories->getDomainNameResolver(), networkFactories->getConnectionFactory(), networkFactories->getTimerFactory(), proxyHostname, proxyPort));
@@ -104,3 +104,3 @@ void CoreClient::connect(const ClientOptions& o) {
case ClientOptions::HTTPConnectProxy: {
- SWIFT_LOG(debug) << " with manual configured HTTPConnect proxy" << std::endl;
+ SWIFT_LOG(debug) << " with manual configured HTTPConnect proxy";
std::string proxyHostname = o.manualProxyHostname.empty() ? systemHTTPConnectProxy.getAddress().toString() : o.manualProxyHostname;
@@ -112,3 +112,3 @@ void CoreClient::connect(const ClientOptions& o) {
catch (const boost::numeric::bad_numeric_cast& e) {
- SWIFT_LOG(warning) << "Manual proxy port " << o.manualProxyPort << " is invalid: " << e.what() << std::endl;
+ SWIFT_LOG(warning) << "Manual proxy port " << o.manualProxyPort << " is invalid: " << e.what();
onDisconnected(boost::optional<ClientError>(ClientError::ConnectionError));
@@ -117,3 +117,3 @@ void CoreClient::connect(const ClientOptions& o) {
}
- SWIFT_LOG(debug) << "Proxy: " << proxyHostname << ":" << proxyPort << std::endl;
+ SWIFT_LOG(debug) << "Proxy: " << proxyHostname << ":" << proxyPort;
proxyConnectionFactories.push_back(new HTTPConnectProxiedConnectionFactory(networkFactories->getDomainNameResolver(), networkFactories->getConnectionFactory(), networkFactories->getTimerFactory(), proxyHostname, proxyPort, o.httpTrafficFilter));
@@ -136,3 +136,3 @@ void CoreClient::connect(const ClientOptions& o) {
catch (const boost::numeric::bad_numeric_cast& e) {
- SWIFT_LOG(warning) << "Invalid manual port " << o.manualPort << ": " << e.what() << std::endl;
+ SWIFT_LOG(warning) << "Invalid manual port " << o.manualPort << ": " << e.what();
onDisconnected(boost::optional<ClientError>(ClientError::ConnectionError));
@@ -176,3 +176,3 @@ void CoreClient::connect(const ClientOptions& o) {
if (certificate_ && !certificate_->isNull()) {
- SWIFT_LOG(debug) << "set certificate" << std::endl;
+ SWIFT_LOG(debug) << "set certificate";
sessionStream_->setTLSCertificate(certificate_);
@@ -425,3 +425,3 @@ void CoreClient::sendData(const std::string& data) {
if (!sessionStream_) {
- SWIFT_LOG(warning) << "Client: Trying to send data while disconnected." << std::endl;
+ SWIFT_LOG(warning) << "Client: Trying to send data while disconnected.";
return;
@@ -509,3 +509,3 @@ void CoreClient::forceReset() {
if (connector_) {
- SWIFT_LOG(warning) << "Client not disconnected properly: Connector still active" << std::endl;
+ SWIFT_LOG(warning) << "Client not disconnected properly: Connector still active";
resetConnector();
@@ -513,3 +513,3 @@ void CoreClient::forceReset() {
if (sessionStream_ || connection_) {
- SWIFT_LOG(warning) << "Client not disconnected properly: Session still active" << std::endl;
+ SWIFT_LOG(warning) << "Client not disconnected properly: Session still active";
resetSession();
diff --git a/Swiften/Component/ComponentSessionStanzaChannel.cpp b/Swiften/Component/ComponentSessionStanzaChannel.cpp
index e4bf231..deac8b2 100644
--- a/Swiften/Component/ComponentSessionStanzaChannel.cpp
+++ b/Swiften/Component/ComponentSessionStanzaChannel.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2017 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -49,3 +49,3 @@ void ComponentSessionStanzaChannel::send(std::shared_ptr<Stanza> stanza) {
if (!isAvailable()) {
- SWIFT_LOG(warning) << "Component: Trying to send a stanza while disconnected." << std::endl;
+ SWIFT_LOG(warning) << "Component: Trying to send a stanza while disconnected.";
return;
diff --git a/Swiften/Component/CoreComponent.cpp b/Swiften/Component/CoreComponent.cpp
index 2d91c9c..ef7d3a4 100644
--- a/Swiften/Component/CoreComponent.cpp
+++ b/Swiften/Component/CoreComponent.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -35,3 +35,3 @@ CoreComponent::~CoreComponent() {
if (session_ || connection_) {
- SWIFT_LOG(warning) << "Component not disconnected properly" << std::endl;
+ SWIFT_LOG(warning) << "Component not disconnected properly";
}
diff --git a/Swiften/Disco/CapsManager.cpp b/Swiften/Disco/CapsManager.cpp
index 794cf74..2b8fb7d 100644
--- a/Swiften/Disco/CapsManager.cpp
+++ b/Swiften/Disco/CapsManager.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -55,3 +55,3 @@ void CapsManager::handleDiscoInfoReceived(const JID& from, const std::string& ha
if (warnOnInvalidHash && !error && discoInfo) {
- SWIFT_LOG(warning) << "Caps from " << from.toString() << " do not verify" << std::endl;
+ SWIFT_LOG(warning) << "Caps from " << from.toString() << " do not verify";
}
diff --git a/Swiften/Disco/DiscoServiceWalker.cpp b/Swiften/Disco/DiscoServiceWalker.cpp
index a3f95d2..7332e63 100644
--- a/Swiften/Disco/DiscoServiceWalker.cpp
+++ b/Swiften/Disco/DiscoServiceWalker.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -19,3 +19,3 @@ DiscoServiceWalker::DiscoServiceWalker(const JID& service, IQRouter* iqRouter, s
void DiscoServiceWalker::beginWalk() {
- SWIFT_LOG(debug) << "Starting walk to " << service_ << std::endl;
+ SWIFT_LOG(debug) << "Starting walk to " << service_;
assert(!active_);
@@ -28,3 +28,3 @@ void DiscoServiceWalker::endWalk() {
if (active_) {
- SWIFT_LOG(debug) << "Ending walk to " << service_ << std::endl;
+ SWIFT_LOG(debug) << "Ending walk to " << service_;
for (auto&& request : pendingDiscoInfoRequests_) {
@@ -41,3 +41,3 @@ void DiscoServiceWalker::endWalk() {
void DiscoServiceWalker::walkNode(const JID& jid) {
- SWIFT_LOG(debug) << "Walking node " << jid << std::endl;
+ SWIFT_LOG(debug) << "Walking node " << jid;
servicesBeingSearched_.insert(jid);
@@ -56,3 +56,3 @@ void DiscoServiceWalker::handleDiscoInfoResponse(std::shared_ptr<DiscoInfo> info
- SWIFT_LOG(debug) << "Disco info response from " << request->getReceiver() << std::endl;
+ SWIFT_LOG(debug) << "Disco info response from " << request->getReceiver();
@@ -92,3 +92,3 @@ void DiscoServiceWalker::handleDiscoItemsResponse(std::shared_ptr<DiscoItems> it
- SWIFT_LOG(debug) << "Received disco items from " << request->getReceiver() << std::endl;
+ SWIFT_LOG(debug) << "Received disco items from " << request->getReceiver();
request->onResponse.disconnect(boost::bind(&DiscoServiceWalker::handleDiscoItemsResponse, this, _1, _2, request));
@@ -105,3 +105,3 @@ void DiscoServiceWalker::handleDiscoItemsResponse(std::shared_ptr<DiscoItems> it
if (std::find(searchedServices_.begin(), searchedServices_.end(), item.getJID()) == searchedServices_.end()) { /* Don't recurse infinitely */
- SWIFT_LOG(debug) << "Received disco item " << item.getJID() << std::endl;
+ SWIFT_LOG(debug) << "Received disco item " << item.getJID();
walkNode(item.getJID());
@@ -114,3 +114,3 @@ void DiscoServiceWalker::handleDiscoItemsResponse(std::shared_ptr<DiscoItems> it
void DiscoServiceWalker::handleDiscoError(const JID& jid, ErrorPayload::ref /*error*/) {
- SWIFT_LOG(debug) << "Disco error from " << jid << std::endl;
+ SWIFT_LOG(debug) << "Disco error from " << jid;
markNodeCompleted(jid);
@@ -119,3 +119,3 @@ void DiscoServiceWalker::handleDiscoError(const JID& jid, ErrorPayload::ref /*er
void DiscoServiceWalker::markNodeCompleted(const JID& jid) {
- SWIFT_LOG(debug) << "Node completed " << jid << std::endl;
+ SWIFT_LOG(debug) << "Node completed " << jid;
servicesBeingSearched_.erase(jid);
diff --git a/Swiften/Entity/PayloadPersister.cpp b/Swiften/Entity/PayloadPersister.cpp
index 3fd246c..fe51d86 100644
--- a/Swiften/Entity/PayloadPersister.cpp
+++ b/Swiften/Entity/PayloadPersister.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -36,3 +36,3 @@ void PayloadPersister::savePayload(std::shared_ptr<Payload> payload, const boost
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << e.what() << std::endl;
+ SWIFT_LOG(error) << e.what();
}
@@ -52,3 +52,3 @@ std::shared_ptr<Payload> PayloadPersister::loadPayload(const boost::filesystem::
catch (const boost::filesystem::filesystem_error& e) {
- SWIFT_LOG(error) << e.what() << std::endl;
+ SWIFT_LOG(error) << e.what();
}
diff --git a/Swiften/EventLoop/DummyEventLoop.cpp b/Swiften/EventLoop/DummyEventLoop.cpp
index 4712fad..234ba7a 100644
--- a/Swiften/EventLoop/DummyEventLoop.cpp
+++ b/Swiften/EventLoop/DummyEventLoop.cpp
@@ -17,3 +17,3 @@ DummyEventLoop::~DummyEventLoop() {
if (hasEvents()) {
- SWIFT_LOG(warning) << "DummyEventLoop: Unhandled events at destruction time" << std::endl;
+ SWIFT_LOG(warning) << "DummyEventLoop: Unhandled events at destruction time";
}
diff --git a/Swiften/EventLoop/EventLoop.cpp b/Swiften/EventLoop/EventLoop.cpp
index 31c93e9..1852f3f 100644
--- a/Swiften/EventLoop/EventLoop.cpp
+++ b/Swiften/EventLoop/EventLoop.cpp
@@ -24,6 +24,6 @@ inline void invokeCallback(const Event& event) {
catch (const std::exception& e) {
- SWIFT_LOG(error) << "Uncaught exception in event loop: " << e.what() << std::endl;
+ SWIFT_LOG(error) << "Uncaught exception in event loop: " << e.what();
}
catch (...) {
- SWIFT_LOG(error) << "Uncaught non-exception in event loop" << std::endl;
+ SWIFT_LOG(error) << "Uncaught non-exception in event loop";
}
diff --git a/Swiften/Examples/SendFile/ReceiveFile.cpp b/Swiften/Examples/SendFile/ReceiveFile.cpp
index 193c1b7..d641662 100644
--- a/Swiften/Examples/SendFile/ReceiveFile.cpp
+++ b/Swiften/Examples/SendFile/ReceiveFile.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -82,3 +82,3 @@ class FileReceiver {
void handleIncomingFileTransfer(IncomingFileTransfer::ref transfer) {
- SWIFT_LOG(debug) << "foo" << std::endl;
+ SWIFT_LOG(debug) << "foo";
incomingFileTransfers.push_back(transfer);
diff --git a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
index c6987c0..ae3d7e0 100644
--- a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
+++ b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -135,3 +135,3 @@ void DefaultFileTransferTransporter::startActivatingProxy(const JID& proxyServic
// activate proxy
- SWIFT_LOG(debug) << "Start activating proxy " << proxyServiceJID.toString() << " with sid = " << s5bSessionID << "." << std::endl;
+ SWIFT_LOG(debug) << "Start activating proxy " << proxyServiceJID.toString() << " with sid = " << s5bSessionID << ".";
S5BProxyRequest::ref proxyRequest = std::make_shared<S5BProxyRequest>();
@@ -209,3 +209,3 @@ std::shared_ptr<TransportSession> DefaultFileTransferTransporter::createLocalCan
else {
- SWIFT_LOG(error) << "Failed obtaining proxy session with candidate JID " << candidate.jid << " and dstAddr " << getLocalCandidateSOCKS5DstAddr() << "." << std::endl;
+ SWIFT_LOG(error) << "Failed obtaining proxy session with candidate JID " << candidate.jid << " and dstAddr " << getLocalCandidateSOCKS5DstAddr() << ".";
}
@@ -236,3 +236,3 @@ std::shared_ptr<TransportSession> DefaultFileTransferTransporter::createLocalCan
else {
- SWIFT_LOG(error) << "Failed obtaining proxy session with candidate JID " << candidate.jid << " and dstAddr " << getLocalCandidateSOCKS5DstAddr() << "." << std::endl;
+ SWIFT_LOG(error) << "Failed obtaining proxy session with candidate JID " << candidate.jid << " and dstAddr " << getLocalCandidateSOCKS5DstAddr() << ".";
}
@@ -257,3 +257,3 @@ std::string DefaultFileTransferTransporter::getSOCKS5DstAddr() const {
result = getInitiatorCandidateSOCKS5DstAddr();
- SWIFT_LOG(debug) << "Initiator S5B DST.ADDR = " << s5bSessionID << " + " << initiator.toString() << " + " << responder.toString() << " : " << result << std::endl;
+ SWIFT_LOG(debug) << "Initiator S5B DST.ADDR = " << s5bSessionID << " + " << initiator.toString() << " + " << responder.toString() << " : " << result;
}
@@ -261,3 +261,3 @@ std::string DefaultFileTransferTransporter::getSOCKS5DstAddr() const {
result = getResponderCandidateSOCKS5DstAddr();
- SWIFT_LOG(debug) << "Responder S5B DST.ADDR = " << s5bSessionID << " + " << responder.toString() << " + " << initiator.toString() << " : " << result << std::endl;
+ SWIFT_LOG(debug) << "Responder S5B DST.ADDR = " << s5bSessionID << " + " << responder.toString() << " + " << initiator.toString() << " : " << result;
}
diff --git a/Swiften/FileTransfer/FailingTransportSession.cpp b/Swiften/FileTransfer/FailingTransportSession.cpp
index d1eb6a6..b9c79a0 100644
--- a/Swiften/FileTransfer/FailingTransportSession.cpp
+++ b/Swiften/FileTransfer/FailingTransportSession.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2016 Isode Limited.
+ * Copyright (c) 2016-2019 Isode Limited.
* All rights reserved.
@@ -16,3 +16,3 @@ FailingTransportSession::~FailingTransportSession() {
void FailingTransportSession::start() {
- SWIFT_LOG(error) << "Trying to start failing transport." << std::endl;
+ SWIFT_LOG(error) << "Trying to start failing transport.";
onFinished(FileTransferError(FileTransferError::PeerError));
diff --git a/Swiften/FileTransfer/FileTransferManagerImpl.cpp b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
index 05dd3bb..98eb50e 100644
--- a/Swiften/FileTransfer/FileTransferManagerImpl.cpp
+++ b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -158,3 +158,3 @@ OutgoingFileTransfer::ref FileTransferManagerImpl::createOutgoingFileTransfer(
else {
- SWIFT_LOG(warning) << "No entity capabilities information for " << receipient.toString() << std::endl;
+ SWIFT_LOG(warning) << "No entity capabilities information for " << receipient.toString();
}
diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
index d5de5e4..7c46c60 100644
--- a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -69,4 +69,4 @@ void IncomingJingleFileTransfer::accept(
const FileTransferOptions& options) {
- SWIFT_LOG(debug) << std::endl;
- if (state != Initial) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != Initial) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -87,3 +87,3 @@ void IncomingJingleFileTransfer::accept(
if (s5bTransport) {
- SWIFT_LOG(debug) << "Got S5B transport as initial payload." << std::endl;
+ SWIFT_LOG(debug) << "Got S5B transport as initial payload.";
setTransporter(transporterFactory->createResponderTransporter(
@@ -95,3 +95,3 @@ void IncomingJingleFileTransfer::accept(
else if (ibbTransport && options.isInBandAllowed()) {
- SWIFT_LOG(debug) << "Got IBB transport as initial payload." << std::endl;
+ SWIFT_LOG(debug) << "Got IBB transport as initial payload.";
setTransporter(transporterFactory->createResponderTransporter(
@@ -114,3 +114,3 @@ void IncomingJingleFileTransfer::accept(
void IncomingJingleFileTransfer::cancel() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
terminate(state == Initial ? JinglePayload::Reason::Decline : JinglePayload::Reason::Cancel);
@@ -122,4 +122,4 @@ void IncomingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
const std::string& dstAddr) {
- SWIFT_LOG(debug) << std::endl;
- if (state != GeneratingInitialLocalCandidates) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != GeneratingInitialLocalCandidates) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -142,3 +142,3 @@ void IncomingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref jinglePayload) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -146,3 +146,3 @@ void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref ji
if (transferHash) {
- SWIFT_LOG(debug) << "Received hash information." << std::endl;
+ SWIFT_LOG(debug) << "Received hash information.";
waitOnHashTimer->stop();
@@ -159,3 +159,3 @@ void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref ji
else {
- SWIFT_LOG(debug) << "Ignoring unknown session info" << std::endl;
+ SWIFT_LOG(debug) << "Ignoring unknown session info";
}
@@ -164,7 +164,7 @@ void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref ji
void IncomingJingleFileTransfer::handleSessionTerminateReceived(boost::optional<JinglePayload::Reason> reason) {
- SWIFT_LOG(debug) << std::endl;
- if (state == Finished) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state == Finished) { SWIFT_LOG(warning) << "Incorrect state"; return; }
if (state == Finished) {
- SWIFT_LOG(debug) << "Already terminated" << std::endl;
+ SWIFT_LOG(debug) << "Already terminated";
return;
@@ -189,3 +189,3 @@ void IncomingJingleFileTransfer::checkHashAndTerminate() {
else {
- SWIFT_LOG(warning) << "Hash verification failed" << std::endl;
+ SWIFT_LOG(warning) << "Hash verification failed";
terminate(JinglePayload::Reason::MediaError);
@@ -196,3 +196,3 @@ void IncomingJingleFileTransfer::checkIfAllDataReceived() {
if (receivedBytes == getFileSizeInBytes()) {
- SWIFT_LOG(debug) << "All data received." << std::endl;
+ SWIFT_LOG(debug) << "All data received.";
bool hashInfoAvailable = false;
@@ -203,3 +203,3 @@ void IncomingJingleFileTransfer::checkIfAllDataReceived() {
if (!hashInfoAvailable) {
- SWIFT_LOG(debug) << "No hash information yet. Waiting a while on hash info." << std::endl;
+ SWIFT_LOG(debug) << "No hash information yet. Waiting a while on hash info.";
setState(WaitingForHash);
@@ -212,3 +212,3 @@ void IncomingJingleFileTransfer::checkIfAllDataReceived() {
else if (receivedBytes > getFileSizeInBytes()) {
- SWIFT_LOG(debug) << "We got more than we could handle!" << std::endl;
+ SWIFT_LOG(debug) << "We got more than we could handle!";
terminate(JinglePayload::Reason::MediaError);
@@ -227,5 +227,5 @@ void IncomingJingleFileTransfer::handleTransportReplaceReceived(
const JingleContentID& content, JingleTransportPayload::ref transport) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
if (state != WaitingForFallbackOrTerminate) {
- SWIFT_LOG(warning) << "Incorrect state" << std::endl;
+ SWIFT_LOG(warning) << "Incorrect state";
return;
@@ -235,3 +235,3 @@ void IncomingJingleFileTransfer::handleTransportReplaceReceived(
if (options.isInBandAllowed() && (ibbTransport = std::dynamic_pointer_cast<JingleIBBTransportPayload>(transport))) {
- SWIFT_LOG(debug) << "transport replaced with IBB" << std::endl;
+ SWIFT_LOG(debug) << "transport replaced with IBB";
@@ -244,3 +244,3 @@ void IncomingJingleFileTransfer::handleTransportReplaceReceived(
else {
- SWIFT_LOG(debug) << "Unknown replace transport" << std::endl;
+ SWIFT_LOG(debug) << "Unknown replace transport";
session->sendTransportReject(content, transport);
@@ -255,3 +255,3 @@ bool IncomingJingleFileTransfer::verifyData() {
if (hashes.empty()) {
- SWIFT_LOG(debug) << "no verification possible, skipping" << std::endl;
+ SWIFT_LOG(debug) << "no verification possible, skipping";
return true;
@@ -259,3 +259,3 @@ bool IncomingJingleFileTransfer::verifyData() {
if (hashes.find("sha-1") != hashes.end()) {
- SWIFT_LOG(debug) << "Verify SHA-1 hash: " << (hashes["sha-1"] == hashCalculator->getSHA1Hash()) << std::endl;
+ SWIFT_LOG(debug) << "Verify SHA-1 hash: " << (hashes["sha-1"] == hashCalculator->getSHA1Hash());
return hashes["sha-1"] == hashCalculator->getSHA1Hash();
@@ -263,3 +263,3 @@ bool IncomingJingleFileTransfer::verifyData() {
else if (hashes.find("md5") != hashes.end()) {
- SWIFT_LOG(debug) << "Verify MD5 hash: " << (hashes["md5"] == hashCalculator->getMD5Hash()) << std::endl;
+ SWIFT_LOG(debug) << "Verify MD5 hash: " << (hashes["md5"] == hashCalculator->getMD5Hash());
return hashes["md5"] == hashCalculator->getMD5Hash();
@@ -267,3 +267,3 @@ bool IncomingJingleFileTransfer::verifyData() {
else {
- SWIFT_LOG(debug) << "Unknown hash, skipping" << std::endl;
+ SWIFT_LOG(debug) << "Unknown hash, skipping";
return true;
@@ -273,3 +273,3 @@ bool IncomingJingleFileTransfer::verifyData() {
void IncomingJingleFileTransfer::handleWaitOnHashTimerTicked() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
waitOnHashTimer->stop();
@@ -287,3 +287,3 @@ const JID& IncomingJingleFileTransfer::getRecipient() const {
void IncomingJingleFileTransfer::setState(State state) {
- SWIFT_LOG(debug) << state << std::endl;
+ SWIFT_LOG(debug) << state;
this->state = state;
@@ -294,3 +294,3 @@ void IncomingJingleFileTransfer::setFinishedState(
FileTransfer::State::Type type, const boost::optional<FileTransferError>& error) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
this->state = Finished;
@@ -342,3 +342,3 @@ void IncomingJingleFileTransfer::stopAll() {
break;
- case Finished: SWIFT_LOG(warning) << "Already finished" << std::endl; break;
+ case Finished: SWIFT_LOG(warning) << "Already finished"; break;
}
@@ -358,3 +358,3 @@ void IncomingJingleFileTransfer::fallback() {
void IncomingJingleFileTransfer::startTransferViaRemoteCandidate() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -369,3 +369,3 @@ void IncomingJingleFileTransfer::startTransferViaRemoteCandidate() {
void IncomingJingleFileTransfer::startTransferViaLocalCandidate() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -381,3 +381,3 @@ void IncomingJingleFileTransfer::startTransferViaLocalCandidate() {
void IncomingJingleFileTransfer::startTransferring(std::shared_ptr<TransportSession> transportSession) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -411,3 +411,3 @@ std::shared_ptr<TransportSession> IncomingJingleFileTransfer::createRemoteCandid
void IncomingJingleFileTransfer::terminate(JinglePayload::Reason::Type reason) {
- SWIFT_LOG(debug) << reason << std::endl;
+ SWIFT_LOG(debug) << reason;
diff --git a/Swiften/FileTransfer/JingleFileTransfer.cpp b/Swiften/FileTransfer/JingleFileTransfer.cpp
index cc1cd1c..3d05db9 100644
--- a/Swiften/FileTransfer/JingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/JingleFileTransfer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2013-2018 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -80,3 +80,3 @@ void JingleFileTransfer::handleRemoteTransportCandidateSelectFinished(
const std::string& s5bSessionID, const boost::optional<JingleS5BTransportPayload::Candidate>& candidate) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -100,5 +100,5 @@ void JingleFileTransfer::handleRemoteTransportCandidateSelectFinished(
void JingleFileTransfer::decideOnCandidates() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
if (!ourCandidateSelectFinished || !theirCandidateSelectFinished) {
- SWIFT_LOG(debug) << "Can't make a decision yet!" << std::endl;
+ SWIFT_LOG(debug) << "Can't make a decision yet!";
return;
@@ -106,3 +106,3 @@ void JingleFileTransfer::decideOnCandidates() {
if (!ourCandidateChoice && !theirCandidateChoice) {
- SWIFT_LOG(debug) << "No candidates succeeded." << std::endl;
+ SWIFT_LOG(debug) << "No candidates succeeded.";
fallback();
@@ -110,3 +110,3 @@ void JingleFileTransfer::decideOnCandidates() {
else if (ourCandidateChoice && !theirCandidateChoice) {
- SWIFT_LOG(debug) << "Start transfer using remote candidate: " << ourCandidateChoice.get().cid << "." << std::endl;
+ SWIFT_LOG(debug) << "Start transfer using remote candidate: " << ourCandidateChoice.get().cid << ".";
startTransferViaRemoteCandidate();
@@ -114,3 +114,3 @@ void JingleFileTransfer::decideOnCandidates() {
else if (theirCandidateChoice && !ourCandidateChoice) {
- SWIFT_LOG(debug) << "Start transfer using local candidate: " << theirCandidateChoice.get().cid << "." << std::endl;
+ SWIFT_LOG(debug) << "Start transfer using local candidate: " << theirCandidateChoice.get().cid << ".";
startTransferViaLocalCandidate();
@@ -120,5 +120,5 @@ void JingleFileTransfer::decideOnCandidates() {
<< ourCandidateChoice->cid << "(" << ourCandidateChoice->priority << ")" << " and "
- << theirCandidateChoice->cid << "(" << theirCandidateChoice->priority << ")" << std::endl;
+ << theirCandidateChoice->cid << "(" << theirCandidateChoice->priority << ")";
if (ourCandidateChoice->priority > theirCandidateChoice->priority) {
- SWIFT_LOG(debug) << "Start transfer using remote candidate: " << ourCandidateChoice.get().cid << "." << std::endl;
+ SWIFT_LOG(debug) << "Start transfer using remote candidate: " << ourCandidateChoice.get().cid << ".";
startTransferViaRemoteCandidate();
@@ -126,3 +126,3 @@ void JingleFileTransfer::decideOnCandidates() {
else if (ourCandidateChoice->priority < theirCandidateChoice->priority) {
- SWIFT_LOG(debug) << "Start transfer using local candidate:" << theirCandidateChoice.get().cid << "." << std::endl;
+ SWIFT_LOG(debug) << "Start transfer using local candidate:" << theirCandidateChoice.get().cid << ".";
startTransferViaLocalCandidate();
@@ -131,3 +131,3 @@ void JingleFileTransfer::decideOnCandidates() {
if (hasPriorityOnCandidateTie()) {
- SWIFT_LOG(debug) << "Start transfer using remote candidate: " << ourCandidateChoice.get().cid << std::endl;
+ SWIFT_LOG(debug) << "Start transfer using remote candidate: " << ourCandidateChoice.get().cid;
startTransferViaRemoteCandidate();
@@ -135,3 +135,3 @@ void JingleFileTransfer::decideOnCandidates() {
else {
- SWIFT_LOG(debug) << "Start transfer using local candidate: " << theirCandidateChoice.get().cid << std::endl;
+ SWIFT_LOG(debug) << "Start transfer using local candidate: " << theirCandidateChoice.get().cid;
startTransferViaLocalCandidate();
@@ -144,7 +144,7 @@ void JingleFileTransfer::handleProxyActivateFinished(
const std::string& s5bSessionID, ErrorPayload::ref error) {
- SWIFT_LOG(debug) << std::endl;
- if (!isWaitingForLocalProxyActivate()) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (!isWaitingForLocalProxyActivate()) { SWIFT_LOG(warning) << "Incorrect state"; return; }
if (error) {
- SWIFT_LOG(debug) << "Error activating proxy" << std::endl;
+ SWIFT_LOG(debug) << "Error activating proxy";
JingleS5BTransportPayload::ref proxyError = std::make_shared<JingleS5BTransportPayload>();
@@ -166,3 +166,3 @@ void JingleFileTransfer::handleTransportInfoReceived(
const JingleContentID& /* contentID */, JingleTransportPayload::ref transport) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -170,4 +170,4 @@ void JingleFileTransfer::handleTransportInfoReceived(
if (s5bPayload->hasCandidateError() || !s5bPayload->getCandidateUsed().empty()) {
- SWIFT_LOG(debug) << "Received candidate decision from peer" << std::endl;
- if (!isTryingCandidates()) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug) << "Received candidate decision from peer";
+ if (!isTryingCandidates()) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -177,3 +177,3 @@ void JingleFileTransfer::handleTransportInfoReceived(
if (theirCandidate == localCandidates.end()) {
- SWIFT_LOG(warning) << "Got invalid candidate" << std::endl;
+ SWIFT_LOG(warning) << "Got invalid candidate";
terminate(JinglePayload::Reason::GeneralError);
@@ -186,4 +186,4 @@ void JingleFileTransfer::handleTransportInfoReceived(
else if (!s5bPayload->getActivated().empty()) {
- SWIFT_LOG(debug) << "Received peer activate from peer" << std::endl;
- if (!isWaitingForPeerProxyActivate()) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug) << "Received peer activate from peer";
+ if (!isWaitingForPeerProxyActivate()) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -193,3 +193,3 @@ void JingleFileTransfer::handleTransportInfoReceived(
else {
- SWIFT_LOG(warning) << "ourCandidateChoice doesn't match activated proxy candidate!" << std::endl;
+ SWIFT_LOG(warning) << "ourCandidateChoice doesn't match activated proxy candidate!";
terminate(JinglePayload::Reason::GeneralError);
@@ -198,3 +198,3 @@ void JingleFileTransfer::handleTransportInfoReceived(
else if (s5bPayload->hasProxyError()) {
- SWIFT_LOG(debug) << "Received proxy error. Trying to fall back to IBB." << std::endl;
+ SWIFT_LOG(debug) << "Received proxy error. Trying to fall back to IBB.";
fallback();
@@ -202,3 +202,3 @@ void JingleFileTransfer::handleTransportInfoReceived(
else {
- SWIFT_LOG(debug) << "Ignoring unknown info" << std::endl;
+ SWIFT_LOG(debug) << "Ignoring unknown info";
}
@@ -206,3 +206,3 @@ void JingleFileTransfer::handleTransportInfoReceived(
else {
- SWIFT_LOG(debug) << "Ignoring unknown info" << std::endl;
+ SWIFT_LOG(debug) << "Ignoring unknown info";
}
diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
index 834a401..7cb4cbb 100644
--- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
+++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -47,3 +47,3 @@ LocalJingleTransportCandidateGenerator::LocalJingleTransportCandidateGenerator(
LocalJingleTransportCandidateGenerator::~LocalJingleTransportCandidateGenerator() {
- SWIFT_LOG_ASSERT(!s5bServerInitializeRequest, warning) << std::endl;
+ SWIFT_LOG_ASSERT(!s5bServerInitializeRequest, warning);
}
@@ -100,3 +100,3 @@ void LocalJingleTransportCandidateGenerator::handleS5BServerInitialized(bool suc
else {
- SWIFT_LOG(warning) << "Unable to start SOCKS5 server" << std::endl;
+ SWIFT_LOG(warning) << "Unable to start SOCKS5 server";
if (s5bServerResourceUser_) {
diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
index 367fc97..57a18a8 100644
--- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -89,5 +89,5 @@ OutgoingJingleFileTransfer::~OutgoingJingleFileTransfer() {
void OutgoingJingleFileTransfer::start() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
if (state != Initial) {
- SWIFT_LOG(warning) << "Incorrect state" << std::endl;
+ SWIFT_LOG(warning) << "Incorrect state";
return;
@@ -111,3 +111,3 @@ void OutgoingJingleFileTransfer::cancel() {
void OutgoingJingleFileTransfer::terminate(JinglePayload::Reason::Type reason) {
- SWIFT_LOG(debug) << reason << std::endl;
+ SWIFT_LOG(debug) << reason;
@@ -124,4 +124,4 @@ void OutgoingJingleFileTransfer::handleSessionAcceptReceived(
JingleTransportPayload::ref transportPayload) {
- SWIFT_LOG(debug) << std::endl;
- if (state != WaitingForAccept) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != WaitingForAccept) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -136,3 +136,3 @@ void OutgoingJingleFileTransfer::handleSessionAcceptReceived(
else {
- SWIFT_LOG(debug) << "Unknown transport payload. Falling back." << std::endl;
+ SWIFT_LOG(debug) << "Unknown transport payload. Falling back.";
fallback();
@@ -142,4 +142,4 @@ void OutgoingJingleFileTransfer::handleSessionAcceptReceived(
void OutgoingJingleFileTransfer::handleSessionTerminateReceived(boost::optional<JinglePayload::Reason> reason) {
- SWIFT_LOG(debug) << std::endl;
- if (state == Finished) { SWIFT_LOG(warning) << "Incorrect state: " << state << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state == Finished) { SWIFT_LOG(warning) << "Incorrect state: " << state; return; }
@@ -164,4 +164,4 @@ void OutgoingJingleFileTransfer::handleSessionTerminateReceived(boost::optional<
void OutgoingJingleFileTransfer::handleTransportAcceptReceived(const JingleContentID&, JingleTransportPayload::ref transport) {
- SWIFT_LOG(debug) << std::endl;
- if (state != FallbackRequested) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != FallbackRequested) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -171,3 +171,3 @@ void OutgoingJingleFileTransfer::handleTransportAcceptReceived(const JingleConte
else {
- SWIFT_LOG(debug) << "Unknown transport replacement" << std::endl;
+ SWIFT_LOG(debug) << "Unknown transport replacement";
terminate(JinglePayload::Reason::FailedTransport);
@@ -177,3 +177,3 @@ void OutgoingJingleFileTransfer::handleTransportAcceptReceived(const JingleConte
void OutgoingJingleFileTransfer::handleTransportRejectReceived(const JingleContentID &, std::shared_ptr<JingleTransportPayload>) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -183,3 +183,3 @@ void OutgoingJingleFileTransfer::handleTransportRejectReceived(const JingleConte
void OutgoingJingleFileTransfer::sendSessionInfoHash() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -193,4 +193,4 @@ void OutgoingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
const std::string& s5bSessionID, const std::vector<JingleS5BTransportPayload::Candidate>& candidates, const std::string& dstAddr) {
- SWIFT_LOG(debug) << std::endl;
- if (state != GeneratingInitialLocalCandidates) { SWIFT_LOG(warning) << "Incorrect state: " << state << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != GeneratingInitialLocalCandidates) { SWIFT_LOG(warning) << "Incorrect state: " << state; return; }
@@ -205,3 +205,3 @@ void OutgoingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
if (candidates.empty()) {
- SWIFT_LOG(debug) << "no S5B candidates generated. Send IBB transport candidate." << std::endl;
+ SWIFT_LOG(debug) << "no S5B candidates generated. Send IBB transport candidate.";
JingleIBBTransportPayload::ref ibbTransport = std::make_shared<JingleIBBTransportPayload>();
@@ -218,3 +218,3 @@ void OutgoingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
s5bTransport->addCandidate(candidate);
- SWIFT_LOG(debug) << "\t" << "S5B candidate: " << candidate.hostPort.toString() << std::endl;
+ SWIFT_LOG(debug) << "\t" << "S5B candidate: " << candidate.hostPort.toString();
}
@@ -228,3 +228,3 @@ void OutgoingJingleFileTransfer::fallback() {
if (options.isInBandAllowed()) {
- SWIFT_LOG(debug) << "Trying to fallback to IBB transport." << std::endl;
+ SWIFT_LOG(debug) << "Trying to fallback to IBB transport.";
JingleIBBTransportPayload::ref ibbTransport = std::make_shared<JingleIBBTransportPayload>();
@@ -236,3 +236,3 @@ void OutgoingJingleFileTransfer::fallback() {
else {
- SWIFT_LOG(debug) << "Fallback to IBB transport not allowed." << std::endl;
+ SWIFT_LOG(debug) << "Fallback to IBB transport not allowed.";
terminate(JinglePayload::Reason::ConnectivityError);
@@ -242,4 +242,4 @@ void OutgoingJingleFileTransfer::fallback() {
void OutgoingJingleFileTransfer::handleTransferFinished(boost::optional<FileTransferError> error) {
- SWIFT_LOG(debug) << std::endl;
- if (state != Transferring) { SWIFT_LOG(warning) << "Incorrect state: " << state << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != Transferring) { SWIFT_LOG(warning) << "Incorrect state: " << state; return; }
@@ -258,3 +258,3 @@ void OutgoingJingleFileTransfer::handleTransferFinished(boost::optional<FileTran
void OutgoingJingleFileTransfer::startTransferring(std::shared_ptr<TransportSession> transportSession) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -271,3 +271,3 @@ void OutgoingJingleFileTransfer::startTransferring(std::shared_ptr<TransportSess
void OutgoingJingleFileTransfer::setInternalState(State state) {
- SWIFT_LOG(debug) << state << std::endl;
+ SWIFT_LOG(debug) << state;
this->state = state;
@@ -278,3 +278,3 @@ void OutgoingJingleFileTransfer::setFinishedState(
FileTransfer::State::Type type, const boost::optional<FileTransferError>& error) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
this->state = Finished;
@@ -303,5 +303,5 @@ FileTransfer::State::Type OutgoingJingleFileTransfer::getExternalState(State sta
void OutgoingJingleFileTransfer::stopAll() {
- SWIFT_LOG(debug) << state << std::endl;
+ SWIFT_LOG(debug) << state;
switch (state) {
- case Initial: SWIFT_LOG(warning) << "Not yet started" << std::endl; break;
+ case Initial: SWIFT_LOG(warning) << "Not yet started"; break;
case GeneratingInitialLocalCandidates: transporter->stopGeneratingLocalCandidates(); break;
@@ -322,3 +322,3 @@ void OutgoingJingleFileTransfer::stopAll() {
break;
- case Finished: SWIFT_LOG(warning) << "Already finished" << std::endl; break;
+ case Finished: SWIFT_LOG(warning) << "Already finished"; break;
}
@@ -330,3 +330,3 @@ void OutgoingJingleFileTransfer::stopAll() {
void OutgoingJingleFileTransfer::startTransferViaRemoteCandidate() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -342,3 +342,3 @@ void OutgoingJingleFileTransfer::startTransferViaRemoteCandidate() {
void OutgoingJingleFileTransfer::startTransferViaLocalCandidate() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -402,3 +402,3 @@ void OutgoingJingleFileTransfer::handleWaitForRemoteTerminationTimeout() {
assert(state == WaitForTermination);
- SWIFT_LOG(warning) << "Other party did not terminate session. Terminate it now." << std::endl;
+ SWIFT_LOG(warning) << "Other party did not terminate session. Terminate it now.";
waitForRemoteTermination->stop();
diff --git a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp
index 56013ca..4023be3 100644
--- a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp
+++ b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -58,3 +58,3 @@ void RemoteJingleTransportCandidateSelector::tryNextCandidate() {
if (candidates.empty()) {
- SWIFT_LOG(debug) << "No more candidates" << std::endl;
+ SWIFT_LOG(debug) << "No more candidates";
onCandidateSelectFinished(
@@ -65,3 +65,3 @@ void RemoteJingleTransportCandidateSelector::tryNextCandidate() {
candidates.pop();
- SWIFT_LOG(debug) << "Trying candidate " << lastCandidate.cid << std::endl;
+ SWIFT_LOG(debug) << "Trying candidate " << lastCandidate.cid;
if ((lastCandidate.type == JingleS5BTransportPayload::Candidate::DirectType && options.isDirectAllowed()) ||
@@ -77,3 +77,3 @@ void RemoteJingleTransportCandidateSelector::tryNextCandidate() {
else {
- SWIFT_LOG(debug) << "Can't handle this type of candidate" << std::endl;
+ SWIFT_LOG(debug) << "Can't handle this type of candidate";
tryNextCandidate();
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp
index 5ddd32b..a3f0dab 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -51,3 +51,3 @@ void SOCKS5BytestreamClientSession::start() {
assert(state == Initial);
- SWIFT_LOG(debug) << "Trying to connect via TCP to " << addressPort.toString() << "." << std::endl;
+ SWIFT_LOG(debug) << "Trying to connect via TCP to " << addressPort.toString() << ".";
weFailedTimeout->start();
@@ -59,3 +59,3 @@ void SOCKS5BytestreamClientSession::start() {
void SOCKS5BytestreamClientSession::stop() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
if (state < Ready) {
@@ -72,3 +72,3 @@ void SOCKS5BytestreamClientSession::stop() {
void SOCKS5BytestreamClientSession::process() {
- SWIFT_LOG(debug) << "unprocessedData.size(): " << unprocessedData.size() << std::endl;
+ SWIFT_LOG(debug) << "unprocessedData.size(): " << unprocessedData.size();
ByteArray bndAddress;
@@ -126,3 +126,3 @@ void SOCKS5BytestreamClientSession::process() {
state = Ready;
- SWIFT_LOG(debug) << "session ready" << std::endl;
+ SWIFT_LOG(debug) << "session ready";
// issue ready signal so the bytestream can be used for reading or writing
@@ -132,3 +132,3 @@ void SOCKS5BytestreamClientSession::process() {
case Ready:
- SWIFT_LOG(debug) << "Received further data in Ready state." << std::endl;
+ SWIFT_LOG(debug) << "Received further data in Ready state.";
break;
@@ -137,4 +137,4 @@ void SOCKS5BytestreamClientSession::process() {
case Finished:
- SWIFT_LOG(debug) << "Unexpected receive of data. Current state: " << state << std::endl;
- SWIFT_LOG(debug) << "Data: " << Hexify::hexify(unprocessedData) << std::endl;
+ SWIFT_LOG(debug) << "Unexpected receive of data. Current state: " << state;
+ SWIFT_LOG(debug) << "Data: " << Hexify::hexify(unprocessedData);
unprocessedData.clear();
@@ -152,3 +152,3 @@ void SOCKS5BytestreamClientSession::hello() {
void SOCKS5BytestreamClientSession::authenticate() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
SafeByteArray header = createSafeByteArray("\x05\x01\x00\x03", 4);
@@ -170,3 +170,3 @@ void SOCKS5BytestreamClientSession::startReceiving(std::shared_ptr<WriteBytestre
} else {
- SWIFT_LOG(debug) << "Session isn't ready for transfer yet!" << std::endl;
+ SWIFT_LOG(debug) << "Session isn't ready for transfer yet!";
}
@@ -182,3 +182,3 @@ void SOCKS5BytestreamClientSession::startSending(std::shared_ptr<ReadBytestream>
} else {
- SWIFT_LOG(debug) << "Session isn't ready for transfer yet!" << std::endl;
+ SWIFT_LOG(debug) << "Session isn't ready for transfer yet!";
}
@@ -207,3 +207,3 @@ void SOCKS5BytestreamClientSession::sendData() {
void SOCKS5BytestreamClientSession::finish(bool error) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
if (state < Ready) {
@@ -229,6 +229,6 @@ void SOCKS5BytestreamClientSession::handleConnectFinished(bool error) {
if (error) {
- SWIFT_LOG(debug) << "Failed to connect via TCP to " << addressPort.toString() << "." << std::endl;
+ SWIFT_LOG(debug) << "Failed to connect via TCP to " << addressPort.toString() << ".";
finish(true);
} else {
- SWIFT_LOG(debug) << "Successfully connected via TCP" << addressPort.toString() << "." << std::endl;
+ SWIFT_LOG(debug) << "Successfully connected via TCP" << addressPort.toString() << ".";
disconnectedConnection = connection->onDisconnected.connect(
@@ -244,3 +244,3 @@ void SOCKS5BytestreamClientSession::handleConnectFinished(bool error) {
void SOCKS5BytestreamClientSession::handleDataRead(std::shared_ptr<SafeByteArray> data) {
- SWIFT_LOG(debug) << "state: " << state << " data.size() = " << data->size() << std::endl;
+ SWIFT_LOG(debug) << "state: " << state << " data.size() = " << data->size();
if (state != Reading) {
@@ -256,3 +256,3 @@ void SOCKS5BytestreamClientSession::handleDataRead(std::shared_ptr<SafeByteArray
void SOCKS5BytestreamClientSession::handleDisconnected(const boost::optional<Connection::Error>& error) {
- SWIFT_LOG(debug) << (error ? (error == Connection::ReadError ? "Read Error" : "Write Error") : "No Error") << std::endl;
+ SWIFT_LOG(debug) << (error ? (error == Connection::ReadError ? "Read Error" : "Write Error") : "No Error");
if (error) {
@@ -263,3 +263,3 @@ void SOCKS5BytestreamClientSession::handleDisconnected(const boost::optional<Con
void SOCKS5BytestreamClientSession::handleWeFailedTimeout() {
- SWIFT_LOG(debug) << "Failed due to timeout!" << std::endl;
+ SWIFT_LOG(debug) << "Failed due to timeout!";
finish(true);
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
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -48,3 +48,3 @@ void SOCKS5BytestreamProxiesManager::addS5BProxy(S5BProxyRequest::ref proxy) {
if (proxy) {
- SWIFT_LOG_ASSERT(HostAddress::fromString(proxy->getStreamHost().get().host), warning) << std::endl;
+ SWIFT_LOG_ASSERT(HostAddress::fromString(proxy->getStreamHost().get().host), warning);
if (!localS5BProxies_) {
@@ -64,3 +64,3 @@ const boost::optional<std::vector<S5BProxyRequest::ref> >& SOCKS5BytestreamProxi
void SOCKS5BytestreamProxiesManager::connectToProxies(const std::string& sessionID) {
- SWIFT_LOG(debug) << "session ID: " << sessionID << std::endl;
+ SWIFT_LOG(debug) << "session ID: " << sessionID;
ProxyJIDClientSessionVector clientSessions;
@@ -73,3 +73,3 @@ void SOCKS5BytestreamProxiesManager::connectToProxies(const std::string& session
HostAddressPort addressPort = HostAddressPort(proxyHostAddress.get(), proxy->getStreamHost().get().port);
- SWIFT_LOG_ASSERT(addressPort.isValid(), warning) << std::endl;
+ SWIFT_LOG_ASSERT(addressPort.isValid(), warning);
std::shared_ptr<SOCKS5BytestreamClientSession> session = std::make_shared<SOCKS5BytestreamClientSession>(conn, addressPort, sessionID, timerFactory_);
@@ -105,3 +105,3 @@ std::shared_ptr<SOCKS5BytestreamClientSession> SOCKS5BytestreamProxiesManager::g
}
- SWIFT_LOG_ASSERT(activeSession, warning) << "No active session with matching ID found." << std::endl;
+ SWIFT_LOG_ASSERT(activeSession, warning) << "No active session with matching ID found.";
@@ -146,3 +146,3 @@ void SOCKS5BytestreamProxiesManager::handleNameLookupResult(const std::vector<Ho
if (addresses.empty()) {
- SWIFT_LOG(warning) << "S5B proxy hostname does not resolve." << std::endl;
+ SWIFT_LOG(warning) << "S5B proxy hostname does not resolve.";
}
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.cpp b/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.cpp
index 90c42dd..1efc54a 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamProxyFinder.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -73,6 +73,6 @@ void SOCKS5BytestreamProxyFinder::handleProxyResponse(std::shared_ptr<GenericReq
if (error) {
- SWIFT_LOG(debug) << "ERROR" << std::endl;
+ SWIFT_LOG(debug) << "ERROR";
} else {
if (request) {
- SWIFT_LOG(debug) << "add request" << std::endl;
+ SWIFT_LOG(debug) << "add request";
proxyHosts.push_back(request);
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
index a6b75da..7fc1388 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2012-2018 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
@@ -50,8 +50,8 @@ SOCKS5BytestreamServerManager::SOCKS5BytestreamServerManager(
SOCKS5BytestreamServerManager::~SOCKS5BytestreamServerManager() {
- SWIFT_LOG_ASSERT(!connectionServer, warning) << std::endl;
- SWIFT_LOG_ASSERT(!getPublicIPRequest, warning) << std::endl;
- SWIFT_LOG_ASSERT(!forwardPortRequest, warning) << std::endl;
- SWIFT_LOG_ASSERT(state == Start, warning) << std::endl;
+ SWIFT_LOG_ASSERT(!connectionServer, warning);
+ SWIFT_LOG_ASSERT(!getPublicIPRequest, warning);
+ SWIFT_LOG_ASSERT(!forwardPortRequest, warning);
+ SWIFT_LOG_ASSERT(state == Start, warning);
if (portMapping && !unforwardPortRequest) {
- SWIFT_LOG(warning) << "Port forwarding still alive. Trying to remove it now." << std::endl;
+ SWIFT_LOG(warning) << "Port forwarding still alive. Trying to remove it now.";
unforwardPortRequest = natTraverser->createRemovePortForwardingRequest(portMapping.get().getLocalPort(), portMapping.get().getPublicPort());
@@ -118,3 +118,3 @@ void SOCKS5BytestreamServerManager::initialize() {
for (port = LISTEN_PORTS_BEGIN; port < LISTEN_PORTS_END; ++port) {
- SWIFT_LOG(debug) << "Trying to start server on port " << port << std::endl;
+ SWIFT_LOG(debug) << "Trying to start server on port " << port;
connectionServer = connectionServerFactory->createConnectionServer(HostAddress::fromString("::").get(), port);
@@ -125,3 +125,3 @@ void SOCKS5BytestreamServerManager::initialize() {
else if (*error != ConnectionServer::Conflict) {
- SWIFT_LOG(debug) << "Error starting server" << std::endl;
+ SWIFT_LOG(debug) << "Error starting server";
onInitialized(false);
@@ -132,3 +132,3 @@ void SOCKS5BytestreamServerManager::initialize() {
if (!connectionServer) {
- SWIFT_LOG(debug) << "Unable to find an open port" << std::endl;
+ SWIFT_LOG(debug) << "Unable to find an open port";
onInitialized(false);
@@ -136,3 +136,3 @@ void SOCKS5BytestreamServerManager::initialize() {
}
- SWIFT_LOG(debug) << "Server started succesfully" << std::endl;
+ SWIFT_LOG(debug) << "Server started succesfully";
connectionServerPort = port;
@@ -213,6 +213,6 @@ void SOCKS5BytestreamServerManager::handleGetPublicIPResult(boost::optional<Host
if (address) {
- SWIFT_LOG(debug) << "Public IP discovered as " << address.get().toString() << "." << std::endl;
+ SWIFT_LOG(debug) << "Public IP discovered as " << address.get().toString() << ".";
}
else {
- SWIFT_LOG(debug) << "No public IP discoverable." << std::endl;
+ SWIFT_LOG(debug) << "No public IP discoverable.";
}
@@ -227,6 +227,6 @@ void SOCKS5BytestreamServerManager::handleForwardPortResult(boost::optional<NATP
if (mapping) {
- SWIFT_LOG(debug) << "Mapping port was successful." << std::endl;
+ SWIFT_LOG(debug) << "Mapping port was successful.";
}
else {
- SWIFT_LOG(debug) << "Mapping port has failed." << std::endl;
+ SWIFT_LOG(debug) << "Mapping port has failed.";
}
@@ -245,3 +245,3 @@ void SOCKS5BytestreamServerManager::handleUnforwardPortResult(boost::optional<bo
else {
- SWIFT_LOG(warning) << "Failed to remove port forwarding." << std::endl;
+ SWIFT_LOG(warning) << "Failed to remove port forwarding.";
}
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.cpp b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.cpp
index 0fd40bf..a4ab751 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -35,3 +35,3 @@ SOCKS5BytestreamServerSession::~SOCKS5BytestreamServerSession() {
if (state != Finished && state != Initial) {
- SWIFT_LOG(warning) << "SOCKS5BytestreamServerSession unfinished" << std::endl;
+ SWIFT_LOG(warning) << "SOCKS5BytestreamServerSession unfinished";
finish();
@@ -41,3 +41,3 @@ SOCKS5BytestreamServerSession::~SOCKS5BytestreamServerSession() {
void SOCKS5BytestreamServerSession::start() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
dataReadConnection = connection->onDataRead.connect(
@@ -52,3 +52,3 @@ void SOCKS5BytestreamServerSession::stop() {
void SOCKS5BytestreamServerSession::startSending(std::shared_ptr<ReadBytestream> stream) {
- if (state != ReadyForTransfer) { SWIFT_LOG(debug) << "Not ready for transfer!" << std::endl; return; }
+ if (state != ReadyForTransfer) { SWIFT_LOG(debug) << "Not ready for transfer!"; return; }
@@ -64,3 +64,3 @@ void SOCKS5BytestreamServerSession::startSending(std::shared_ptr<ReadBytestream>
void SOCKS5BytestreamServerSession::startReceiving(std::shared_ptr<WriteBytestream> stream) {
- if (state != ReadyForTransfer) { SWIFT_LOG(debug) << "Not ready for transfer!" << std::endl; return; }
+ if (state != ReadyForTransfer) { SWIFT_LOG(debug) << "Not ready for transfer!"; return; }
@@ -95,3 +95,3 @@ void SOCKS5BytestreamServerSession::handleDataAvailable() {
void SOCKS5BytestreamServerSession::handleDisconnected(const boost::optional<Connection::Error>& error) {
- SWIFT_LOG(debug) << (error ? (error == Connection::ReadError ? "Read Error" : "Write Error") : "No Error") << std::endl;
+ SWIFT_LOG(debug) << (error ? (error == Connection::ReadError ? "Read Error" : "Write Error") : "No Error");
finish(error ? boost::optional<FileTransferError>(FileTransferError::PeerError) : boost::optional<FileTransferError>());
@@ -111,3 +111,3 @@ void SOCKS5BytestreamServerSession::process() {
if (i != unprocessedData.size()) {
- SWIFT_LOG(debug) << "Junk after authentication mechanism" << std::endl;
+ SWIFT_LOG(debug) << "Junk after authentication mechanism";
}
@@ -132,3 +132,3 @@ void SOCKS5BytestreamServerSession::process() {
if (i != unprocessedData.size()) {
- SWIFT_LOG(debug) << "Junk after authentication mechanism" << std::endl;
+ SWIFT_LOG(debug) << "Junk after authentication mechanism";
}
@@ -144,3 +144,3 @@ void SOCKS5BytestreamServerSession::process() {
catch (const boost::numeric::bad_numeric_cast& e) {
- SWIFT_LOG(warning) << "SOCKS5 request ID is too long (" << requestID.size() << "): " << e.what() << std::endl;
+ SWIFT_LOG(warning) << "SOCKS5 request ID is too long (" << requestID.size() << "): " << e.what();
finish();
@@ -150,3 +150,3 @@ void SOCKS5BytestreamServerSession::process() {
if (!hasBytestream) {
- SWIFT_LOG(debug) << "Readstream or Wrtiestream with ID " << streamID << " not found!" << std::endl;
+ SWIFT_LOG(debug) << "Readstream or Wrtiestream with ID " << streamID << " not found!";
connection->write(result);
@@ -155,3 +155,3 @@ void SOCKS5BytestreamServerSession::process() {
else {
- SWIFT_LOG(debug) << "Found stream. Sent OK." << std::endl;
+ SWIFT_LOG(debug) << "Found stream. Sent OK.";
connection->write(result);
@@ -187,3 +187,3 @@ void SOCKS5BytestreamServerSession::sendData() {
void SOCKS5BytestreamServerSession::finish(const boost::optional<FileTransferError>& error) {
- SWIFT_LOG(debug) << "state: " << state << std::endl;
+ SWIFT_LOG(debug) << "state: " << state;
if (state == Finished) {
diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
index 80667b6..fad02da 100644
--- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -240,3 +240,3 @@ private:
//append(dataToSend, failingData);
- //SWIFT_LOG(debug) << "hexed: " << Hexify::hexify(failingData) << std::endl;
+ //SWIFT_LOG(debug) << "hexed: " << Hexify::hexify(failingData);
do {
@@ -257,3 +257,3 @@ private:
append(unprocessedInput, data);
- //SWIFT_LOG(debug) << "unprocessedInput (" << unprocessedInput.size() << "): " << Hexify::hexify(unprocessedInput) << std::endl;
+ //SWIFT_LOG(debug) << "unprocessedInput (" << unprocessedInput.size() << "): " << Hexify::hexify(unprocessedInput);
}
diff --git a/Swiften/Jingle/AbstractJingleSessionListener.cpp b/Swiften/Jingle/AbstractJingleSessionListener.cpp
index 20edf15..56d2e92 100644
--- a/Swiften/Jingle/AbstractJingleSessionListener.cpp
+++ b/Swiften/Jingle/AbstractJingleSessionListener.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2019 Isode Limited.
* All rights reserved.
@@ -13,3 +13,3 @@ using namespace Swift;
void AbstractJingleSessionListener::handleSessionAcceptReceived(const JingleContentID&, std::shared_ptr<JingleDescription>, std::shared_ptr<JingleTransportPayload>) {
- SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+ SWIFT_LOG(warning) << "Unimplemented";
}
@@ -17,3 +17,3 @@ void AbstractJingleSessionListener::handleSessionAcceptReceived(const JingleCont
void AbstractJingleSessionListener::handleSessionInfoReceived(std::shared_ptr<JinglePayload>) {
- SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+ SWIFT_LOG(warning) << "Unimplemented";
}
@@ -21,3 +21,3 @@ void AbstractJingleSessionListener::handleSessionInfoReceived(std::shared_ptr<Ji
void AbstractJingleSessionListener::handleSessionTerminateReceived(boost::optional<JinglePayload::Reason>) {
- SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+ SWIFT_LOG(warning) << "Unimplemented";
}
@@ -25,3 +25,3 @@ void AbstractJingleSessionListener::handleSessionTerminateReceived(boost::option
void AbstractJingleSessionListener::handleTransportAcceptReceived(const JingleContentID&, std::shared_ptr<JingleTransportPayload>) {
- SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+ SWIFT_LOG(warning) << "Unimplemented";
}
@@ -29,3 +29,3 @@ void AbstractJingleSessionListener::handleTransportAcceptReceived(const JingleCo
void AbstractJingleSessionListener::handleTransportInfoReceived(const JingleContentID&, std::shared_ptr<JingleTransportPayload>) {
- SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+ SWIFT_LOG(warning) << "Unimplemented";
}
@@ -33,3 +33,3 @@ void AbstractJingleSessionListener::handleTransportInfoReceived(const JingleCont
void AbstractJingleSessionListener::handleTransportRejectReceived(const JingleContentID&, std::shared_ptr<JingleTransportPayload>) {
- SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+ SWIFT_LOG(warning) << "Unimplemented";
}
@@ -37,3 +37,3 @@ void AbstractJingleSessionListener::handleTransportRejectReceived(const JingleCo
void AbstractJingleSessionListener::handleTransportReplaceReceived(const JingleContentID&, std::shared_ptr<JingleTransportPayload>) {
- SWIFT_LOG(warning) << "Unimplemented" << std::endl;
+ SWIFT_LOG(warning) << "Unimplemented";
}
diff --git a/Swiften/Jingle/JingleResponder.cpp b/Swiften/Jingle/JingleResponder.cpp
index 09bb234..af9808e 100644
--- a/Swiften/Jingle/JingleResponder.cpp
+++ b/Swiften/Jingle/JingleResponder.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -34,3 +34,3 @@ bool JingleResponder::handleSetRequest(const JID& from, const JID& to, const std
} else {
- SWIFT_LOG(debug) << "Unable to create Jingle session due to initiator not being a full JID." << std::endl;
+ SWIFT_LOG(debug) << "Unable to create Jingle session due to initiator not being a full JID.";
}
@@ -41,6 +41,6 @@ bool JingleResponder::handleSetRequest(const JID& from, const JID& to, const std
if (payload->getInitiator().isValid()) {
- SWIFT_LOG(debug) << "Lookup session by initiator." << std::endl;
+ SWIFT_LOG(debug) << "Lookup session by initiator.";
session = sessionManager->getSession(payload->getInitiator(), payload->getSessionID());
} else {
- SWIFT_LOG(debug) << "Lookup session by from attribute." << std::endl;
+ SWIFT_LOG(debug) << "Lookup session by from attribute.";
session = sessionManager->getSession(from, payload->getSessionID());
diff --git a/Swiften/Jingle/JingleSessionImpl.cpp b/Swiften/Jingle/JingleSessionImpl.cpp
index 06aa039..b4c5d03 100644
--- a/Swiften/Jingle/JingleSessionImpl.cpp
+++ b/Swiften/Jingle/JingleSessionImpl.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -25,3 +25,3 @@ namespace Swift {
JingleSessionImpl::JingleSessionImpl(const JID& initiator, const JID& peerJID, const std::string& id, IQRouter* router) : JingleSession(initiator, id), iqRouter(router), peerJID(peerJID) {
- SWIFT_LOG(debug) << "initiator: " << initiator << ", peerJID: " << peerJID << std::endl;
+ SWIFT_LOG(debug) << "initiator: " << initiator << ", peerJID: " << peerJID;
}
@@ -40,3 +40,3 @@ void JingleSessionImpl::handleIncomingAction(JinglePayload::ref action) {
if (!content) {
- SWIFT_LOG(debug) << "no content payload!" << std::endl;
+ SWIFT_LOG(debug) << "no content payload!";
return;
diff --git a/Swiften/Jingle/JingleSessionManager.cpp b/Swiften/Jingle/JingleSessionManager.cpp
index f7ed58e..083554a 100644
--- a/Swiften/Jingle/JingleSessionManager.cpp
+++ b/Swiften/Jingle/JingleSessionManager.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -40,3 +40,3 @@ void JingleSessionManager::registerOutgoingSession(const JID& initiator, JingleS
sessions.insert(std::make_pair(JIDSession(initiator, session->getID()), session));
- SWIFT_LOG(debug) << "Added session " << session->getID() << " for initiator " << initiator.toString() << std::endl;
+ SWIFT_LOG(debug) << "Added session " << session->getID() << " for initiator " << initiator.toString();
}
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp
index 08de722..262add3 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -17,3 +17,3 @@ namespace Swift {
AvahiResolveHostnameQuery::AvahiResolveHostnameQuery(const std::string& hostname, int, std::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), hostname(hostname) {
- SWIFT_LOG(debug) << "Resolving hostname " << hostname << std::endl;
+ SWIFT_LOG(debug) << "Resolving hostname " << hostname;
}
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
index 9eb8cd9..cc95d64 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -28,3 +28,3 @@ namespace Swift {
catch (const boost::numeric::bad_numeric_cast&) {
- SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not registring service" << std::endl;
+ SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not registring service";
return;
@@ -36,3 +36,3 @@ namespace Swift {
if (result != kDNSServiceErr_NoError) {
- SWIFT_LOG(warning) << "Failed to register Bonjour service" << std::endl;
+ SWIFT_LOG(warning) << "Failed to register Bonjour service";
sdRef = nullptr;
@@ -60,3 +60,3 @@ namespace Swift {
catch (const boost::numeric::bad_numeric_cast&) {
- SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not updating service record" << std::endl;
+ SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not updating service record";
}
diff --git a/Swiften/LinkLocal/LinkLocalServiceInfo.cpp b/Swiften/LinkLocal/LinkLocalServiceInfo.cpp
index 914fab4..5e529fd 100644
--- a/Swiften/LinkLocal/LinkLocalServiceInfo.cpp
+++ b/Swiften/LinkLocal/LinkLocalServiceInfo.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -51,3 +51,3 @@ boost::optional<ByteArray> LinkLocalServiceInfo::toTXTRecord() const {
catch (const std::exception& e) {
- SWIFT_LOG(warning) << "Failed to create TXT record for link local service info: " << e.what() << std::endl;
+ SWIFT_LOG(warning) << "Failed to create TXT record for link local service info: " << e.what();
return boost::none;
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
@@ -76,3 +76,3 @@ void BOSHConnection::cancelConnector() {
void BOSHConnection::handleTLSConnected() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
onConnectFinished(false);
@@ -81,3 +81,3 @@ void BOSHConnection::handleTLSConnected() {
void BOSHConnection::handleTLSApplicationDataRead(const SafeByteArray& data) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
handleDataRead(std::make_shared<SafeByteArray>(data));
@@ -86,3 +86,3 @@ void BOSHConnection::handleTLSApplicationDataRead(const SafeByteArray& data) {
void BOSHConnection::handleTLSNetowrkDataWriteRequest(const SafeByteArray& data) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
connection_->write(data);
@@ -91,3 +91,3 @@ void BOSHConnection::handleTLSNetowrkDataWriteRequest(const SafeByteArray& data)
void BOSHConnection::handleRawDataRead(std::shared_ptr<SafeByteArray> data) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
tlsLayer_->handleDataRead(*data.get());
@@ -96,3 +96,3 @@ void BOSHConnection::handleRawDataRead(std::shared_ptr<SafeByteArray> data) {
void BOSHConnection::handleTLSError(std::shared_ptr<TLSError> error) {
- SWIFT_LOG(debug) << (error ? error->getMessage() : "Unknown TLS error") << std::endl;
+ SWIFT_LOG(debug) << (error ? error->getMessage() : "Unknown TLS error");
}
@@ -125,3 +125,3 @@ bool BOSHConnection::setClientCertificate(CertificateWithKey::ref cert) {
if (tlsLayer_) {
- SWIFT_LOG(debug) << "set client certificate" << std::endl;
+ SWIFT_LOG(debug) << "set client certificate";
return tlsLayer_->setClientCertificate(cert);
@@ -213,3 +213,3 @@ void BOSHConnection::write(const SafeByteArray& data, bool streamRestart, bool t
- SWIFT_LOG(debug) << "write data: " << safeByteArrayToString(safeHeader) << std::endl;
+ SWIFT_LOG(debug) << "write data: " << safeByteArrayToString(safeHeader);
}
@@ -277,3 +277,3 @@ void BOSHConnection::startStream(const std::string& to, unsigned long long rid)
writeData(safeHeader);
- SWIFT_LOG(debug) << "write stream header: " << safeByteArrayToString(safeHeader) << std::endl;
+ SWIFT_LOG(debug) << "write stream header: " << safeByteArrayToString(safeHeader);
}
diff --git a/Swiften/Network/BOSHConnectionPool.cpp b/Swiften/Network/BOSHConnectionPool.cpp
index 8a75e81..3a79a16 100644
--- a/Swiften/Network/BOSHConnectionPool.cpp
+++ b/Swiften/Network/BOSHConnectionPool.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -268,3 +268,3 @@ std::shared_ptr<BOSHConnection> BOSHConnectionPool::createConnection() {
bool success = connection->setClientCertificate(clientCertificate);
- SWIFT_LOG(debug) << "setClientCertificate, success: " << success << std::endl;
+ SWIFT_LOG(debug) << "setClientCertificate, success: " << success;
}
diff --git a/Swiften/Network/BoostConnection.cpp b/Swiften/Network/BoostConnection.cpp
index 551363d..6ae6bf6 100644
--- a/Swiften/Network/BoostConnection.cpp
+++ b/Swiften/Network/BoostConnection.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -109,3 +109,3 @@ void BoostConnection::doWrite(const SafeByteArray& data) {
void BoostConnection::handleConnectFinished(const boost::system::error_code& error) {
- SWIFT_LOG(debug) << "Connect finished: " << error << std::endl;
+ SWIFT_LOG(debug) << "Connect finished: " << error;
if (!error) {
@@ -128,3 +128,3 @@ void BoostConnection::doRead() {
void BoostConnection::handleSocketRead(const boost::system::error_code& error, size_t bytesTransferred) {
- SWIFT_LOG(debug) << "Socket read " << error << std::endl;
+ SWIFT_LOG(debug) << "Socket read " << error;
if (!error) {
@@ -143,3 +143,3 @@ void BoostConnection::handleSocketRead(const boost::system::error_code& error, s
void BoostConnection::handleDataWritten(const boost::system::error_code& error) {
- SWIFT_LOG(debug) << "Data written " << error << std::endl;
+ SWIFT_LOG(debug) << "Data written " << error;
if (!error) {
diff --git a/Swiften/Network/BoostConnectionServer.cpp b/Swiften/Network/BoostConnectionServer.cpp
index 8db9656..dc05172 100644
--- a/Swiften/Network/BoostConnectionServer.cpp
+++ b/Swiften/Network/BoostConnectionServer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -48,3 +48,3 @@ boost::optional<BoostConnectionServer::Error> BoostConnectionServer::tryStart()
acceptor_->set_option(boost::asio::ip::v6_only(false), ec);
- SWIFT_LOG_ASSERT(ec, warning) << "IPv4/IPv6 dual-stack support is not supported on this platform." << std::endl;
+ SWIFT_LOG_ASSERT(ec, warning) << "IPv4/IPv6 dual-stack support is not supported on this platform.";
}
diff --git a/Swiften/Network/ChainedConnector.cpp b/Swiften/Network/ChainedConnector.cpp
index 94899ad..a9210ba 100644
--- a/Swiften/Network/ChainedConnector.cpp
+++ b/Swiften/Network/ChainedConnector.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2018 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -47,3 +47,3 @@ void ChainedConnector::setTimeoutMilliseconds(int milliseconds) {
void ChainedConnector::start() {
- SWIFT_LOG(debug) << "Starting queued connector for " << hostname << std::endl;
+ SWIFT_LOG(debug) << "Starting queued connector for " << hostname;
@@ -65,3 +65,3 @@ void ChainedConnector::tryNextConnectionFactory() {
if (connectionFactoryQueue.empty()) {
- SWIFT_LOG(debug) << "No more connection factories" << std::endl;
+ SWIFT_LOG(debug) << "No more connection factories";
finish(std::shared_ptr<Connection>(), lastError);
@@ -70,3 +70,3 @@ void ChainedConnector::tryNextConnectionFactory() {
ConnectionFactory* connectionFactory = connectionFactoryQueue.front();
- SWIFT_LOG(debug) << "Trying next connection factory: " << typeid(*connectionFactory).name() << std::endl;
+ SWIFT_LOG(debug) << "Trying next connection factory: " << typeid(*connectionFactory).name();
connectionFactoryQueue.pop_front();
@@ -80,3 +80,3 @@ void ChainedConnector::tryNextConnectionFactory() {
void ChainedConnector::handleConnectorFinished(std::shared_ptr<Connection> connection, std::shared_ptr<Error> error) {
- SWIFT_LOG(debug) << "Connector finished" << std::endl;
+ SWIFT_LOG(debug) << "Connector finished";
currentConnector->onConnectFinished.disconnect(boost::bind(&ChainedConnector::handleConnectorFinished, this, _1, _2));
diff --git a/Swiften/Network/Connector.cpp b/Swiften/Network/Connector.cpp
index a0e6b23..e27b95d 100644
--- a/Swiften/Network/Connector.cpp
+++ b/Swiften/Network/Connector.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -27,3 +27,3 @@ void Connector::setTimeoutMilliseconds(int milliseconds) {
void Connector::start() {
- SWIFT_LOG(debug) << "Starting connector for " << hostname << std::endl;
+ SWIFT_LOG(debug) << "Starting connector for " << hostname;
assert(!currentConnection);
@@ -68,3 +68,3 @@ void Connector::queryAddress(const std::string& hostname) {
void Connector::handleServiceQueryResult(const std::vector<DomainNameServiceQuery::Result>& result) {
- SWIFT_LOG(debug) << result.size() << " SRV result(s)" << std::endl;
+ SWIFT_LOG(debug) << result.size() << " SRV result(s)";
serviceQueryResults = std::deque<DomainNameServiceQuery::Result>(result.begin(), result.end());
@@ -79,3 +79,3 @@ void Connector::tryNextServiceOrFallback() {
if (queriedAllServices) {
- SWIFT_LOG(debug) << "Queried all services" << std::endl;
+ SWIFT_LOG(debug) << "Queried all services";
finish(std::shared_ptr<Connection>());
@@ -83,3 +83,3 @@ void Connector::tryNextServiceOrFallback() {
else if (serviceQueryResults.empty()) {
- SWIFT_LOG(debug) << "Falling back on A resolution" << std::endl;
+ SWIFT_LOG(debug) << "Falling back on A resolution";
// Fall back on simple address resolving
@@ -89,3 +89,3 @@ void Connector::tryNextServiceOrFallback() {
else {
- SWIFT_LOG(debug) << "Querying next address" << std::endl;
+ SWIFT_LOG(debug) << "Querying next address";
queryAddress(serviceQueryResults.front().hostname);
@@ -95,3 +95,3 @@ void Connector::tryNextServiceOrFallback() {
void Connector::handleAddressQueryResult(const std::vector<HostAddress>& addresses, boost::optional<DomainNameResolveError> error) {
- SWIFT_LOG(debug) << addresses.size() << " addresses" << std::endl;
+ SWIFT_LOG(debug) << addresses.size() << " addresses";
addressQuery.reset();
@@ -112,3 +112,3 @@ void Connector::tryNextAddress() {
if (addressQueryResults.empty()) {
- SWIFT_LOG(debug) << "Done trying addresses. Moving on." << std::endl;
+ SWIFT_LOG(debug) << "Done trying addresses. Moving on.";
// Done trying all addresses. Move on to the next host.
@@ -120,3 +120,3 @@ void Connector::tryNextAddress() {
else {
- SWIFT_LOG(debug) << "Trying next address" << std::endl;
+ SWIFT_LOG(debug) << "Trying next address";
HostAddress address = addressQueryResults.front();
@@ -135,3 +135,3 @@ void Connector::tryConnect(const HostAddressPort& target) {
assert(!currentConnection);
- SWIFT_LOG(debug) << "Trying to connect to " << target.getAddress().toString() << ":" << target.getPort() << std::endl;
+ SWIFT_LOG(debug) << "Trying to connect to " << target.getAddress().toString() << ":" << target.getPort();
currentConnection = connectionFactory->createConnection();
@@ -145,3 +145,3 @@ void Connector::tryConnect(const HostAddressPort& target) {
void Connector::handleConnectionConnectFinished(bool error) {
- SWIFT_LOG(debug) << "ConnectFinished: " << (error ? "error" : "success") << std::endl;
+ SWIFT_LOG(debug) << "ConnectFinished: " << (error ? "error" : "success");
if (timer) {
@@ -197,4 +197,4 @@ void Connector::finish(std::shared_ptr<Connection> connection) {
void Connector::handleTimeout() {
- SWIFT_LOG(debug) << "Timeout" << std::endl;
- SWIFT_LOG_ASSERT(currentConnection, error) << "Connection not valid but triggered a timeout" <<std::endl;
+ SWIFT_LOG(debug) << "Timeout";
+ SWIFT_LOG_ASSERT(currentConnection, error) << "Connection not valid but triggered a timeout";
handleConnectionConnectFinished(true);
diff --git a/Swiften/Network/EnvironmentProxyProvider.cpp b/Swiften/Network/EnvironmentProxyProvider.cpp
index 65cf4ff..6fbf373 100644
--- a/Swiften/Network/EnvironmentProxyProvider.cpp
+++ b/Swiften/Network/EnvironmentProxyProvider.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2016 Isode Limited.
+ * Copyright (c) 2016-2019 Isode Limited.
* All rights reserved.
@@ -28,3 +28,3 @@ EnvironmentProxyProvider::EnvironmentProxyProvider() {
httpProxy = getFromEnv("http_proxy", "http");
- SWIFT_LOG(debug) << "Environment: SOCKS5 => " << socksProxy.toString() << "; HTTP Connect => " << httpProxy.toString() << std::endl;
+ SWIFT_LOG(debug) << "Environment: SOCKS5 => " << socksProxy.toString() << "; HTTP Connect => " << httpProxy.toString();
}
diff --git a/Swiften/Network/GConfProxyProvider.cpp b/Swiften/Network/GConfProxyProvider.cpp
index 7c31868..a2f8adc 100644
--- a/Swiften/Network/GConfProxyProvider.cpp
+++ b/Swiften/Network/GConfProxyProvider.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2016-2018 Isode Limited.
+ * Copyright (c) 2016-2019 Isode Limited.
* All rights reserved.
@@ -41,3 +41,3 @@ GConfProxyProvider::GConfProxyProvider() {
httpProxy = getFromGConf("/system/http_proxy/host", "/system/http_proxy/port");
- SWIFT_LOG(debug) << "GConf: SOCKS5 => " << socksProxy.toString() << "; HTTP Connect => " << httpProxy.toString() << std::endl;
+ SWIFT_LOG(debug) << "GConf: SOCKS5 => " << socksProxy.toString() << "; HTTP Connect => " << httpProxy.toString();
}
diff --git a/Swiften/Network/HTTPConnectProxiedConnection.cpp b/Swiften/Network/HTTPConnectProxiedConnection.cpp
index 8eba49e..e63b8e2 100644
--- a/Swiften/Network/HTTPConnectProxiedConnection.cpp
+++ b/Swiften/Network/HTTPConnectProxiedConnection.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2011-2018 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -79,3 +79,3 @@ void HTTPConnectProxiedConnection::initializeProxy() {
append(data, createSafeByteArray("\r\n"));
- SWIFT_LOG(debug) << "HTTP Proxy send headers: " << byteArrayToString(ByteArray(data.begin(), data.end())) << std::endl;
+ SWIFT_LOG(debug) << "HTTP Proxy send headers: " << byteArrayToString(ByteArray(data.begin(), data.end()));
write(data);
@@ -113,3 +113,3 @@ void HTTPConnectProxiedConnection::handleProxyInitializeData(std::shared_ptr<Saf
std::string dataString = byteArrayToString(ByteArray(data->begin(), data->end()));
- SWIFT_LOG(debug) << data << std::endl;
+ SWIFT_LOG(debug) << data;
httpResponseBuffer_.append(dataString);
@@ -143,3 +143,3 @@ void HTTPConnectProxiedConnection::handleProxyInitializeData(std::shared_ptr<Saf
int status = boost::lexical_cast<int>(tmp[1]);
- SWIFT_LOG(debug) << "Proxy Status: " << status << std::endl;
+ SWIFT_LOG(debug) << "Proxy Status: " << status;
if (status / 100 == 2) { // all 2XX states are OK
@@ -148,3 +148,3 @@ void HTTPConnectProxiedConnection::handleProxyInitializeData(std::shared_ptr<Saf
else {
- SWIFT_LOG(debug) << "HTTP Proxy returned an error: " << httpResponseBuffer_ << std::endl;
+ SWIFT_LOG(debug) << "HTTP Proxy returned an error: " << httpResponseBuffer_;
setProxyInitializeFinished(false);
@@ -153,3 +153,3 @@ void HTTPConnectProxiedConnection::handleProxyInitializeData(std::shared_ptr<Saf
catch (boost::bad_lexical_cast&) {
- SWIFT_LOG(warning) << "Unexpected response: " << tmp[1] << std::endl;
+ SWIFT_LOG(warning) << "Unexpected response: " << tmp[1];
setProxyInitializeFinished(false);
diff --git a/Swiften/Network/HostAddress.cpp b/Swiften/Network/HostAddress.cpp
index 6eca80b..e82f433 100644
--- a/Swiften/Network/HostAddress.cpp
+++ b/Swiften/Network/HostAddress.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -45,3 +45,3 @@ std::string HostAddress::toString() const {
if (errorCode) {
- SWIFT_LOG(debug) << "error: " << errorCode.message() << std::endl;
+ SWIFT_LOG(debug) << "error: " << errorCode.message();
}
diff --git a/Swiften/Network/NATPMPInterface.cpp b/Swiften/Network/NATPMPInterface.cpp
index 0c33c1f..e20fecd 100644
--- a/Swiften/Network/NATPMPInterface.cpp
+++ b/Swiften/Network/NATPMPInterface.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2014-2018 Isode Limited.
+ * Copyright (c) 2014-2019 Isode Limited.
* All rights reserved.
@@ -44,3 +44,3 @@ boost::optional<HostAddress> NATPMPInterface::getPublicIP() {
if (sendpublicaddressrequest(&p->natpmp) < 0) {
- SWIFT_LOG(debug) << "Failed to send NAT-PMP public address request!" << std::endl;
+ SWIFT_LOG(debug) << "Failed to send NAT-PMP public address request!";
return boost::optional<HostAddress>();
@@ -69,3 +69,3 @@ boost::optional<HostAddress> NATPMPInterface::getPublicIP() {
else {
- SWIFT_LOG(debug) << "Inavlid NAT-PMP response." << std::endl;
+ SWIFT_LOG(debug) << "Inavlid NAT-PMP response.";
return boost::optional<HostAddress>();
@@ -82,3 +82,3 @@ boost::optional<NATPortMapping> NATPMPInterface::addPortForward(unsigned short l
mapping.getLeaseInSeconds()) < 0) {
- SWIFT_LOG(debug) << "Failed to send NAT-PMP port forwarding request!" << std::endl;
+ SWIFT_LOG(debug) << "Failed to send NAT-PMP port forwarding request!";
return boost::optional<NATPortMapping>();
@@ -108,3 +108,3 @@ boost::optional<NATPortMapping> NATPMPInterface::addPortForward(unsigned short l
else {
- SWIFT_LOG(debug) << "Invalid NAT-PMP response." << std::endl;
+ SWIFT_LOG(debug) << "Invalid NAT-PMP response.";
return boost::optional<NATPortMapping>();
@@ -115,3 +115,3 @@ bool NATPMPInterface::removePortForward(const NATPortMapping& mapping) {
if (sendnewportmappingrequest(&p->natpmp, mapping.getProtocol() == NATPortMapping::TCP ? NATPMP_PROTOCOL_TCP : NATPMP_PROTOCOL_UDP, mapping.getLocalPort(), 0, 0) < 0) {
- SWIFT_LOG(debug) << "Failed to send NAT-PMP remove forwarding request!" << std::endl;
+ SWIFT_LOG(debug) << "Failed to send NAT-PMP remove forwarding request!";
return false;
@@ -135,3 +135,3 @@ bool NATPMPInterface::removePortForward(const NATPortMapping& mapping) {
else {
- SWIFT_LOG(debug) << "Invalid NAT-PMP response." << std::endl;
+ SWIFT_LOG(debug) << "Invalid NAT-PMP response.";
return false;
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
index f884500..2ff14e1 100644
--- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp
+++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -60,3 +60,3 @@ void PlatformDomainNameServiceQuery::runBlocking() {
- SWIFT_LOG(debug) << "Querying " << service << std::endl;
+ SWIFT_LOG(debug) << "Querying " << service;
@@ -99,3 +99,3 @@ void PlatformDomainNameServiceQuery::runBlocking() {
if (responseLength == -1) {
- SWIFT_LOG(debug) << "Error" << std::endl;
+ SWIFT_LOG(debug) << "Error";
emitError();
diff --git a/Swiften/Network/PlatformNATTraversalWorker.cpp b/Swiften/Network/PlatformNATTraversalWorker.cpp
index 041ad2d..5431379 100644
--- a/Swiften/Network/PlatformNATTraversalWorker.cpp
+++ b/Swiften/Network/PlatformNATTraversalWorker.cpp
@@ -159,3 +159,3 @@ NATTraversalInterface* PlatformNATTraversalWorker::getNATTraversalInterface() co
}
- SWIFT_LOG(debug) << "UPnP NAT traversal supported: " << static_cast<bool>(miniUPnPSupported) << std::endl;
+ SWIFT_LOG(debug) << "UPnP NAT traversal supported: " << static_cast<bool>(miniUPnPSupported);
if (miniUPnPSupported) {
@@ -170,3 +170,3 @@ NATTraversalInterface* PlatformNATTraversalWorker::getNATTraversalInterface() co
}
- SWIFT_LOG(debug) << "NAT-PMP NAT traversal supported: " << static_cast<bool>(natPMPSupported) << std::endl;
+ SWIFT_LOG(debug) << "NAT-PMP NAT traversal supported: " << static_cast<bool>(natPMPSupported);
if (natPMPSupported) {
diff --git a/Swiften/Network/ProxiedConnection.cpp b/Swiften/Network/ProxiedConnection.cpp
index 4c97e31..0c5cda6 100644
--- a/Swiften/Network/ProxiedConnection.cpp
+++ b/Swiften/Network/ProxiedConnection.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2012-2018 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
@@ -39,3 +39,3 @@ ProxiedConnection::~ProxiedConnection() {
if (connected_) {
- SWIFT_LOG(warning) << "Connection was still established." << std::endl;
+ SWIFT_LOG(warning) << "Connection was still established.";
}
diff --git a/Swiften/Network/SOCKS5ProxiedConnection.cpp b/Swiften/Network/SOCKS5ProxiedConnection.cpp
index d7036f2..c76b6e6 100644
--- a/Swiften/Network/SOCKS5ProxiedConnection.cpp
+++ b/Swiften/Network/SOCKS5ProxiedConnection.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2014-2018 Isode Limited.
+ * Copyright (c) 2014-2019 Isode Limited.
* All rights reserved.
@@ -52,3 +52,3 @@ void SOCKS5ProxiedConnection::handleProxyInitializeData(std::shared_ptr<SafeByte
if (proxyState_ == ProxyAuthenticating) {
- SWIFT_LOG(debug) << "ProxyAuthenticating response received, reply with the connect BYTEs" << std::endl;
+ SWIFT_LOG(debug) << "ProxyAuthenticating response received, reply with the connect BYTEs";
unsigned char choosenMethod = static_cast<unsigned char> ((*data)[1]);
@@ -81,3 +81,3 @@ void SOCKS5ProxiedConnection::handleProxyInitializeData(std::shared_ptr<SafeByte
catch(...) {
- SWIFT_LOG(error) << "exception caught" << std::endl;
+ SWIFT_LOG(error) << "exception caught";
}
@@ -94,4 +94,4 @@ void SOCKS5ProxiedConnection::handleProxyInitializeData(std::shared_ptr<SafeByte
else if (proxyState_ == ProxyConnecting) {
- SWIFT_LOG(debug) << "Connect response received, check if successfully." << std::endl;
- SWIFT_LOG(debug) << "Errorbyte: 0x" << std::hex << static_cast<int> ((*data)[1]) << std::dec << std::endl;
+ SWIFT_LOG(debug) << "Connect response received, check if successfully.";
+ SWIFT_LOG(debug) << "Errorbyte: 0x" << std::hex << static_cast<int> ((*data)[1]) << std::dec;
/*
@@ -111,3 +111,3 @@ void SOCKS5ProxiedConnection::handleProxyInitializeData(std::shared_ptr<SafeByte
if ((*data)[0] == 0x05 && (*data)[1] == 0x0) {
- SWIFT_LOG(debug) << "Successfully connected the server via the proxy." << std::endl;
+ SWIFT_LOG(debug) << "Successfully connected the server via the proxy.";
setProxyInitializeFinished(true);
@@ -115,3 +115,3 @@ void SOCKS5ProxiedConnection::handleProxyInitializeData(std::shared_ptr<SafeByte
else {
- SWIFT_LOG(error) << "SOCKS Proxy returned an error: " << std::hex << (*data)[1] << std::endl;
+ SWIFT_LOG(error) << "SOCKS Proxy returned an error: " << std::hex << (*data)[1];
setProxyInitializeFinished(false);
diff --git a/Swiften/Network/UnboundDomainNameResolver.cpp b/Swiften/Network/UnboundDomainNameResolver.cpp
index 1df6b8f..21bc697 100644
--- a/Swiften/Network/UnboundDomainNameResolver.cpp
+++ b/Swiften/Network/UnboundDomainNameResolver.cpp
@@ -66,3 +66,3 @@ class UnboundDomainNameServiceQuery : public DomainNameServiceQuery, public Unbo
if(retval != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval);
delete helper;
@@ -75,3 +75,3 @@ class UnboundDomainNameServiceQuery : public DomainNameServiceQuery, public Unbo
if(err != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err);
} else {
@@ -107,3 +107,3 @@ class UnboundDomainNameServiceQuery : public DomainNameServiceQuery, public Unbo
serviceRecords.push_back(serviceRecord);
- SWIFT_LOG(debug) << "hostname " << serviceRecord.hostname << " added" << std::endl;
+ SWIFT_LOG(debug) << "hostname " << serviceRecord.hostname << " added";
}
@@ -139,3 +139,3 @@ class UnboundDomainNameAddressQuery : public DomainNameAddressQuery, public Unbo
if(retval != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval);
delete helper;
@@ -147,6 +147,6 @@ class UnboundDomainNameAddressQuery : public DomainNameAddressQuery, public Unbo
boost::optional<DomainNameResolveError> error;
- SWIFT_LOG(debug) << "Result for: " << name << std::endl;
+ SWIFT_LOG(debug) << "Result for: " << name;
if(err != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err);
error = DomainNameResolveError();
@@ -158,9 +158,9 @@ class UnboundDomainNameAddressQuery : public DomainNameAddressQuery, public Unbo
if ((addressStr = inet_ntop(AF_INET, result->data[i], address, 100))) {
- SWIFT_LOG(debug) << "IPv4 address: " << addressStr << std::endl;
+ SWIFT_LOG(debug) << "IPv4 address: " << addressStr;
addresses.push_back(HostAddress(std::string(addressStr)));
} else if ((addressStr = inet_ntop(AF_INET6, result->data[i], address, 100))) {
- SWIFT_LOG(debug) << "IPv6 address: " << addressStr << std::endl;
+ SWIFT_LOG(debug) << "IPv6 address: " << addressStr;
addresses.push_back(HostAddress(std::string(addressStr)));
} else {
- SWIFT_LOG(debug) << "inet_ntop() failed" << std::endl;
+ SWIFT_LOG(debug) << "inet_ntop() failed";
error = DomainNameResolveError();
@@ -184,3 +184,3 @@ UnboundDomainNameResolver::UnboundDomainNameResolver(IDNConverter* idnConverter,
if(!ubContext) {
- SWIFT_LOG(debug) << "could not create unbound context" << std::endl;
+ SWIFT_LOG(debug) << "could not create unbound context";
}
@@ -194,3 +194,3 @@ UnboundDomainNameResolver::UnboundDomainNameResolver(IDNConverter* idnConverter,
if( (ret=ub_ctx_resolvconf(ubContext, const_cast<char*>("/etc/resolv.conf"))) != 0) {
- SWIFT_LOG(error) << "error reading resolv.conf: " << ub_strerror(ret) << ". errno says: " << strerror(errno) << std::endl;
+ SWIFT_LOG(error) << "error reading resolv.conf: " << ub_strerror(ret) << ". errno says: " << strerror(errno);
}
@@ -198,3 +198,3 @@ UnboundDomainNameResolver::UnboundDomainNameResolver(IDNConverter* idnConverter,
if( (ret=ub_ctx_hosts(ubContext, const_cast<char*>("/etc/hosts"))) != 0) {
- SWIFT_LOG(error) << "error reading hosts: " << ub_strerror(ret) << ". errno says: " << strerror(errno) << std::endl;
+ SWIFT_LOG(error) << "error reading hosts: " << ub_strerror(ret) << ". errno says: " << strerror(errno);
}
@@ -233,3 +233,3 @@ void UnboundDomainNameResolver::processData() {
if(ret != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(ret) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(ret);
}
diff --git a/Swiften/Network/UnitTest/HTTPConnectProxiedConnectionTest.cpp b/Swiften/Network/UnitTest/HTTPConnectProxiedConnectionTest.cpp
index 065d015..e9268b0 100644
--- a/Swiften/Network/UnitTest/HTTPConnectProxiedConnectionTest.cpp
+++ b/Swiften/Network/UnitTest/HTTPConnectProxiedConnectionTest.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -39,3 +39,3 @@ namespace {
filterResponses.push_back(response);
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
return filterResponseReturn;
@@ -411,3 +411,3 @@ class HTTPConnectProxiedConnectionTest : public CppUnit::TestFixture {
connections.push_back(connection);
- SWIFT_LOG(debug) << "new connection created" << std::endl;
+ SWIFT_LOG(debug) << "new connection created";
return connection;
diff --git a/Swiften/Network/WindowsProxyProvider.cpp b/Swiften/Network/WindowsProxyProvider.cpp
index 9a60bb4..13fdb25 100644
--- a/Swiften/Network/WindowsProxyProvider.cpp
+++ b/Swiften/Network/WindowsProxyProvider.cpp
@@ -54,3 +54,3 @@ WindowsProxyProvider::WindowsProxyProvider()
protocolAndProxy = String::getSplittedAtFirst(proxy, '=');
- SWIFT_LOG(debug) << "Found proxy: " << protocolAndProxy.first << " => " << protocolAndProxy.second << std::endl;
+ SWIFT_LOG(debug) << "Found proxy: " << protocolAndProxy.first << " => " << protocolAndProxy.second;
if(protocolAndProxy.first.compare("socks") == 0) {
@@ -88,3 +88,3 @@ HostAddressPort WindowsProxyProvider::getAsHostAddressPort(std::string proxy) {
catch(...) {
- SWIFT_LOG(error) << "Exception occured while parsing windows proxy \"getHostAddressPort\"." << std::endl;
+ SWIFT_LOG(error) << "Exception occured while parsing windows proxy \"getHostAddressPort\".";
}
diff --git a/Swiften/Parser/IQParser.cpp b/Swiften/Parser/IQParser.cpp
index 5cfae34..363f7ec 100644
--- a/Swiften/Parser/IQParser.cpp
+++ b/Swiften/Parser/IQParser.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -34,3 +34,3 @@ void IQParser::handleStanzaAttributes(const AttributeMap& attributes) {
else {
- SWIFT_LOG(warning) << "Unknown IQ type: " << *type << std::endl;
+ SWIFT_LOG(warning) << "Unknown IQ type: " << *type;
getStanzaGeneric()->setType(IQ::Get);
diff --git a/Swiften/Parser/LibXMLParser.cpp b/Swiften/Parser/LibXMLParser.cpp
index 158958b..32b91a1 100644
--- a/Swiften/Parser/LibXMLParser.cpp
+++ b/Swiften/Parser/LibXMLParser.cpp
@@ -36,3 +36,3 @@ static void handleStartElement(void* parser, const xmlChar* name, const xmlChar*
// Just because i don't understand what this means yet :-)
- SWIFT_LOG(error) << "Unexpected nbDefaulted on XML element" << std::endl;
+ SWIFT_LOG(error) << "Unexpected nbDefaulted on XML element";
}
diff --git a/Swiften/Parser/PresenceParser.cpp b/Swiften/Parser/PresenceParser.cpp
index 0235a12..f73e9d8 100644
--- a/Swiften/Parser/PresenceParser.cpp
+++ b/Swiften/Parser/PresenceParser.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -43,3 +43,3 @@ void PresenceParser::handleStanzaAttributes(const AttributeMap& attributes) {
else {
- SWIFT_LOG(error) << "Unknown Presence type: " << *type << std::endl;
+ SWIFT_LOG(error) << "Unknown Presence type: " << *type;
getStanzaGeneric()->setType(Presence::Available);
diff --git a/Swiften/Roster/XMPPRosterController.cpp b/Swiften/Roster/XMPPRosterController.cpp
index 8ee9755..2b98b53 100644
--- a/Swiften/Roster/XMPPRosterController.cpp
+++ b/Swiften/Roster/XMPPRosterController.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -68,3 +68,3 @@ void XMPPRosterController::handleRosterReceived(std::shared_ptr<RosterPayload> r
else {
- SWIFT_LOG(error) << "Stored invalid roster item" << std::endl;
+ SWIFT_LOG(error) << "Stored invalid roster item";
}
diff --git a/Swiften/SASL/WindowsAuthentication.cpp b/Swiften/SASL/WindowsAuthentication.cpp
index b86381b..f951fac 100644
--- a/Swiften/SASL/WindowsAuthentication.cpp
+++ b/Swiften/SASL/WindowsAuthentication.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -18,3 +18,3 @@
errorCode = std::make_shared<boost::system::error_code>(status, boost::system::system_category()); \
- SWIFT_LOG(debug) << std::hex << "status: 0x" << status << ": " << errorCode->message() << std::endl; \
+ SWIFT_LOG(debug) << std::hex << "status: 0x" << status << ": " << errorCode->message(); \
}
@@ -25,3 +25,3 @@
{ \
- SWIFT_LOG(debug) << "success" << std::endl; \
+ SWIFT_LOG(debug) << "success"; \
} \
@@ -48,3 +48,3 @@ std::shared_ptr<boost::system::error_code> getUserNameEx(std::string& userName,
userName = convertWStringToString(std::wstring(vecptr(value), length));
- SWIFT_LOG(debug) << "User Name: " << userName << std::endl;
+ SWIFT_LOG(debug) << "User Name: " << userName;
@@ -52,6 +52,6 @@ std::shared_ptr<boost::system::error_code> getUserNameEx(std::string& userName,
clientName = userName.substr(position + 1);
- SWIFT_LOG(debug) << "Client name: " << clientName << std::endl;
+ SWIFT_LOG(debug) << "Client name: " << clientName;
serverName = userName.substr(0, position);
- SWIFT_LOG(debug) << "Server name: " << serverName << std::endl;
+ SWIFT_LOG(debug) << "Server name: " << serverName;
@@ -163,3 +163,3 @@ std::shared_ptr<boost::system::error_code> initializeSecurityContext(const boost
outputToken = createSafeByteArray (static_cast<unsigned char *>(outputTokenBuffer.pvBuffer), outputTokenBuffer.cbBuffer);
- SWIFT_LOG(debug) << "outputToken.size(): " << outputToken.size() << std::endl;
+ SWIFT_LOG(debug) << "outputToken.size(): " << outputToken.size();
freeContextBuffer(outputTokenBuffer.pvBuffer);
@@ -231,3 +231,3 @@ std::shared_ptr<boost::system::error_code> decryptMessage(const PCtxtHandle cont
- SWIFT_LOG(debug) << "inputMessage.size(): " << inputMessage.size() << std::endl;
+ SWIFT_LOG(debug) << "inputMessage.size(): " << inputMessage.size();
@@ -241,9 +241,9 @@ std::shared_ptr<boost::system::error_code> decryptMessage(const PCtxtHandle cont
if (qualityOfProtection == SECQOP_WRAP_NO_ENCRYPT) {
- SWIFT_LOG(debug) << "Message was signed only" << std::endl;
+ SWIFT_LOG(debug) << "Message was signed only";
}
else {
- SWIFT_LOG(debug) << "Message was encrypted" << std::endl;
+ SWIFT_LOG(debug) << "Message was encrypted";
}
- SWIFT_LOG(debug) << "messageBuffer[1].cbBuffer: " << messageBuffer[1].cbBuffer << std::endl;
+ SWIFT_LOG(debug) << "messageBuffer[1].cbBuffer: " << messageBuffer[1].cbBuffer;
@@ -283,5 +283,5 @@ std::shared_ptr<boost::system::error_code> encryptMessage(const PCtxtHandle cont
- SWIFT_LOG(debug) << "sizes.cbSecurityTrailer: " << sizes.cbSecurityTrailer << std::endl;
- SWIFT_LOG(debug) << "inputMessage.size(): " << inputMessage.size() << std::endl;
- SWIFT_LOG(debug) << "sizes.cbBlockSize: " << sizes.cbBlockSize << std::endl;
+ SWIFT_LOG(debug) << "sizes.cbSecurityTrailer: " << sizes.cbSecurityTrailer;
+ SWIFT_LOG(debug) << "inputMessage.size(): " << inputMessage.size();
+ SWIFT_LOG(debug) << "sizes.cbBlockSize: " << sizes.cbBlockSize;
@@ -296,5 +296,5 @@ std::shared_ptr<boost::system::error_code> encryptMessage(const PCtxtHandle cont
- SWIFT_LOG(debug) << "messageBuffer[0].cbBuffer: " << messageBuffer[0].cbBuffer << std::endl;
- SWIFT_LOG(debug) << "messageBuffer[1].cbBuffer: " << messageBuffer[1].cbBuffer << std::endl;
- SWIFT_LOG(debug) << "messageBuffer[2].cbBuffer: " << messageBuffer[2].cbBuffer << std::endl;
+ SWIFT_LOG(debug) << "messageBuffer[0].cbBuffer: " << messageBuffer[0].cbBuffer;
+ SWIFT_LOG(debug) << "messageBuffer[1].cbBuffer: " << messageBuffer[1].cbBuffer;
+ SWIFT_LOG(debug) << "messageBuffer[2].cbBuffer: " << messageBuffer[2].cbBuffer;
diff --git a/Swiften/SASL/WindowsGSSAPIClientAuthenticator.cpp b/Swiften/SASL/WindowsGSSAPIClientAuthenticator.cpp
index aae437f..10e8c89 100644
--- a/Swiften/SASL/WindowsGSSAPIClientAuthenticator.cpp
+++ b/Swiften/SASL/WindowsGSSAPIClientAuthenticator.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -46,3 +46,3 @@ WindowsGSSAPIClientAuthenticator::~WindowsGSSAPIClientAuthenticator() {
boost::optional<SafeByteArray> WindowsGSSAPIClientAuthenticator::getResponse() const {
- SWIFT_LOG(debug) << "response_.size(): " << response_.size() << std::endl;
+ SWIFT_LOG(debug) << "response_.size(): " << response_.size();
return response_;
@@ -58,3 +58,3 @@ bool WindowsGSSAPIClientAuthenticator::setChallenge(const boost::optional<ByteAr
if (!challengeData) {
- SWIFT_LOG(debug) << "Empty message received from the server" << std::endl;
+ SWIFT_LOG(debug) << "Empty message received from the server";
error_ = true;
@@ -70,3 +70,3 @@ bool WindowsGSSAPIClientAuthenticator::setChallenge(const boost::optional<ByteAr
if (challenge.size() != 4) {
- SWIFT_LOG(debug) << "Token received from the server of incorrect length: " << challenge.size() << std::endl;
+ SWIFT_LOG(debug) << "Token received from the server of incorrect length: " << challenge.size();
error_ = true;
@@ -79,3 +79,3 @@ bool WindowsGSSAPIClientAuthenticator::setChallenge(const boost::optional<ByteAr
if (serverSecurityLayer == 0) {
- SWIFT_LOG(debug) << "Server supports unknown security layer, assuming no security layer" << std::endl;
+ SWIFT_LOG(debug) << "Server supports unknown security layer, assuming no security layer";
serverSecurityLayer = SECURITY_LAYER_NONE;
@@ -83,6 +83,6 @@ bool WindowsGSSAPIClientAuthenticator::setChallenge(const boost::optional<ByteAr
else if (serverSecurityLayer == SECURITY_LAYER_NONE) {
- SWIFT_LOG(debug) << "Server supports no security layer" << std::endl;
+ SWIFT_LOG(debug) << "Server supports no security layer";
}
else {
- SWIFT_LOG(debug) << "Server supports security layer" << std::endl;
+ SWIFT_LOG(debug) << "Server supports security layer";
}
@@ -94,3 +94,3 @@ bool WindowsGSSAPIClientAuthenticator::setChallenge(const boost::optional<ByteAr
if ((serverSecurityLayer == SECURITY_LAYER_NONE) && (serverMaximumBuffer != 0)) {
- SWIFT_LOG(debug) << "Server supports no security layer but has maximum buffer size" << serverMaximumBuffer << std::endl;
+ SWIFT_LOG(debug) << "Server supports no security layer but has maximum buffer size" << serverMaximumBuffer;
error_ = true;
@@ -160,3 +160,3 @@ void WindowsGSSAPIClientAuthenticator::buildSecurityContext(const boost::optiona
if (contextSupported & ISC_REQ_MUTUAL_AUTH == 0) {
- SWIFT_LOG(debug) << "Mutual authentication not supported" << std::endl;
+ SWIFT_LOG(debug) << "Mutual authentication not supported";
error_ = true;
@@ -183,3 +183,3 @@ void WindowsGSSAPIClientAuthenticator::buildSecurityContext(const boost::optiona
userName_ = names.sUserName;
- SWIFT_LOG(debug) << "User name: " << userName_ << std::endl;
+ SWIFT_LOG(debug) << "User name: " << userName_;
@@ -187,6 +187,6 @@ void WindowsGSSAPIClientAuthenticator::buildSecurityContext(const boost::optiona
clientName_ = userName_.substr(position + 1);
- SWIFT_LOG(debug) << "Client name: " << clientName_ << std::endl;
+ SWIFT_LOG(debug) << "Client name: " << clientName_;
serverName_ = userName_.substr(0, position);
- SWIFT_LOG(debug) << "Server name: " << serverName_ << std::endl;
+ SWIFT_LOG(debug) << "Server name: " << serverName_;
diff --git a/Swiften/SASL/WindowsServicePrincipalName.cpp b/Swiften/SASL/WindowsServicePrincipalName.cpp
index 419395c..6c87925 100644
--- a/Swiften/SASL/WindowsServicePrincipalName.cpp
+++ b/Swiften/SASL/WindowsServicePrincipalName.cpp
@@ -66,3 +66,3 @@ std::string WindowsServicePrincipalName::toString() {
- SWIFT_LOG(debug) << "SPN: " << str << std::endl;
+ SWIFT_LOG(debug) << "SPN: " << str;
return str;
@@ -74,13 +74,13 @@ DWORD WindowsServicePrincipalName::dsMakeSpn(DWORD* length, wchar_t* value) {
#ifdef UNICODE
- SWIFT_LOG(debug) << "UNICODE is defined" << std::endl;
+ SWIFT_LOG(debug) << "UNICODE is defined";
#else
- SWIFT_LOG(debug) << "UNICODE is not defined" << std::endl;
+ SWIFT_LOG(debug) << "UNICODE is not defined";
#endif
- SWIFT_LOG(debug) << "serviceClass_: " << convertWStringToString(serviceClass_.c_str()) << std::endl;
- SWIFT_LOG(debug) << "serviceName_: " << convertWStringToString(serviceName_.c_str()) << std::endl;
- SWIFT_LOG(debug) << "instanceName_: " << convertWStringToString(instanceName_.c_str()) << std::endl;
- SWIFT_LOG(debug) << "referrer_: " << convertWStringToString(referrer_.c_str()) << std::endl;
- SWIFT_LOG(debug) << "instancePort_: " << instancePort_ << std::endl;
- SWIFT_LOG(debug) << "length: " << *length << std::endl;
+ SWIFT_LOG(debug) << "serviceClass_: " << convertWStringToString(serviceClass_.c_str());
+ SWIFT_LOG(debug) << "serviceName_: " << convertWStringToString(serviceName_.c_str());
+ SWIFT_LOG(debug) << "instanceName_: " << convertWStringToString(instanceName_.c_str());
+ SWIFT_LOG(debug) << "referrer_: " << convertWStringToString(referrer_.c_str());
+ SWIFT_LOG(debug) << "instancePort_: " << instancePort_;
+ SWIFT_LOG(debug) << "length: " << *length;
@@ -99,3 +99,3 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/ff381407%28v=vs.85%29.a
- SWIFT_LOG(debug) << std::hex << "status: 0x" << status << ": " << errorCode.message() << std::endl;
+ SWIFT_LOG(debug) << std::hex << "status: 0x" << status << ": " << errorCode.message();
}
diff --git a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp
index aaac757..566d556 100644
--- a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -95,3 +95,3 @@ std::string JinglePayloadSerializer::actionToString(JinglePayload::Action action
case JinglePayload::UnknownAction:
- SWIFT_LOG(warning) << "Serializing unknown action value." << std::endl;
+ SWIFT_LOG(warning) << "Serializing unknown action value.";
return "";
@@ -105,3 +105,3 @@ std::string JinglePayloadSerializer::reasonTypeToString(JinglePayload::Reason::T
case JinglePayload::Reason::UnknownType:
- SWIFT_LOG(warning) << "Unknown jingle reason type!" << std::endl;
+ SWIFT_LOG(warning) << "Unknown jingle reason type!";
return "";
diff --git a/Swiften/Serializer/PayloadSerializers/ReferencePayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ReferencePayloadSerializer.cpp
index 6e78a8d..128aac7 100644
--- a/Swiften/Serializer/PayloadSerializers/ReferencePayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ReferencePayloadSerializer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2018 Isode Limited.
+ * Copyright (c) 2018-2019 Isode Limited.
* All rights reserved.
@@ -46,3 +46,3 @@ std::string ReferencePayloadSerializer::serializePayload(ReferencePayload::ref r
else {
- SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(payload.get())).name() << std::endl;
+ SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(payload.get())).name();
}
diff --git a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
index 8c05c6f..f38f5b7 100644
--- a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2016 Isode Limited.
+ * Copyright (c) 2016-2019 Isode Limited.
* All rights reserved.
@@ -201,3 +201,3 @@ namespace Swift {
case WhiteboardPayload::UnknownType:
- SWIFT_LOG(warning) << "Serializing unknown action value." << std::endl;
+ SWIFT_LOG(warning) << "Serializing unknown action value.";
return "";
diff --git a/Swiften/Serializer/StanzaSerializer.cpp b/Swiften/Serializer/StanzaSerializer.cpp
index 3de706d..d4231c5 100644
--- a/Swiften/Serializer/StanzaSerializer.cpp
+++ b/Swiften/Serializer/StanzaSerializer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -55,3 +55,3 @@ SafeByteArray StanzaSerializer::serialize(std::shared_ptr<ToplevelElement> eleme
else {
- SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(payload.get())).name() << std::endl;
+ SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(payload.get())).name();
}
diff --git a/Swiften/Serializer/XMPPSerializer.cpp b/Swiften/Serializer/XMPPSerializer.cpp
index 9cde777..7a003fb 100644
--- a/Swiften/Serializer/XMPPSerializer.cpp
+++ b/Swiften/Serializer/XMPPSerializer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -91,3 +91,3 @@ SafeByteArray XMPPSerializer::serializeElement(std::shared_ptr<ToplevelElement>
else {
- SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(element.get())).name() << std::endl;
+ SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(element.get())).name();
return createSafeByteArray("");
diff --git a/Swiften/StreamManagement/StanzaAckRequester.cpp b/Swiften/StreamManagement/StanzaAckRequester.cpp
index a0f5b70..c71803a 100644
--- a/Swiften/StreamManagement/StanzaAckRequester.cpp
+++ b/Swiften/StreamManagement/StanzaAckRequester.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2018 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -30,3 +30,3 @@ void StanzaAckRequester::handleAckReceived(unsigned int handledStanzasCount) {
if (unackedStanzas.empty()) {
- SWIFT_LOG(warning) << "Server acked more stanzas than we sent" << std::endl;
+ SWIFT_LOG(warning) << "Server acked more stanzas than we sent";
break;
diff --git a/Swiften/StreamStack/WhitespacePingLayer.cpp b/Swiften/StreamStack/WhitespacePingLayer.cpp
index 9a473f3..7c8301e 100644
--- a/Swiften/StreamStack/WhitespacePingLayer.cpp
+++ b/Swiften/StreamStack/WhitespacePingLayer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -24,3 +24,3 @@ WhitespacePingLayer::WhitespacePingLayer(TimerFactory* timerFactory) : isActive(
WhitespacePingLayer::~WhitespacePingLayer() {
- SWIFT_LOG_ASSERT(!isActive, debug) << "WhitespacePingLayer still active at destruction." << std::endl;
+ SWIFT_LOG_ASSERT(!isActive, debug) << "WhitespacePingLayer still active at destruction.";
if (isActive) {
diff --git a/Swiften/TLS/CAPICertificate.cpp b/Swiften/TLS/CAPICertificate.cpp
index f10ad47..526b535 100644
--- a/Swiften/TLS/CAPICertificate.cpp
+++ b/Swiften/TLS/CAPICertificate.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2012-2016 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
@@ -24,3 +24,3 @@
std::shared_ptr<boost::system::error_code> errorCode = std::make_shared<boost::system::error_code>(status, boost::system::system_category()); \
- SWIFT_LOG(debug) << std::hex << function << ": status: 0x" << status << ": " << errorCode->message() << std::endl; \
+ SWIFT_LOG(debug) << std::hex << function << ": status: 0x" << status << ": " << errorCode->message(); \
}
@@ -46,3 +46,3 @@ CAPICertificate::CAPICertificate(const std::string& capiUri, TimerFactory* timer
CAPICertificate::~CAPICertificate() {
- SWIFT_LOG(debug) << "Destroying the CAPICertificate" << std::endl;
+ SWIFT_LOG(debug) << "Destroying the CAPICertificate";
if (smartCardTimer_) {
@@ -55,3 +55,3 @@ CAPICertificate::~CAPICertificate() {
if (CertCloseStore(certStoreHandle_, 0) == FALSE) {
- SWIFT_LOG(debug) << "Failed to close the certificate store handle" << std::endl;
+ SWIFT_LOG(debug) << "Failed to close the certificate store handle";
}
@@ -163,3 +163,3 @@ void CAPICertificate::setUri(const std::string& capiUri) {
&len)) {
- SWIFT_LOG(error) << "Error while retrieving context properties" << std::endl;
+ SWIFT_LOG(error) << "Error while retrieving context properties";
return;
@@ -289,21 +289,21 @@ bool CAPICertificate::checkIfSmartCardPresent() {
case SCARD_ABSENT:
- SWIFT_LOG(debug) << "Card absent." << std::endl;
+ SWIFT_LOG(debug) << "Card absent.";
break;
case SCARD_PRESENT:
- SWIFT_LOG(debug) << "Card present." << std::endl;
+ SWIFT_LOG(debug) << "Card present.";
break;
case SCARD_SWALLOWED:
- SWIFT_LOG(debug) << "Card swallowed." << std::endl;
+ SWIFT_LOG(debug) << "Card swallowed.";
break;
case SCARD_POWERED:
- SWIFT_LOG(debug) << "Card has power." << std::endl;
+ SWIFT_LOG(debug) << "Card has power.";
break;
case SCARD_NEGOTIABLE:
- SWIFT_LOG(debug) << "Card reset and waiting PTS negotiation." << std::endl;
+ SWIFT_LOG(debug) << "Card reset and waiting PTS negotiation.";
break;
case SCARD_SPECIFIC:
- SWIFT_LOG(debug) << "Card has specific communication protocols set." << std::endl;
+ SWIFT_LOG(debug) << "Card has specific communication protocols set.";
break;
default:
- SWIFT_LOG(debug) << "Unknown or unexpected card state." << std::endl;
+ SWIFT_LOG(debug) << "Unknown or unexpected card state.";
break;
@@ -334,3 +334,3 @@ void CAPICertificate::handleSmartCardTimerTick() {
if (lastPollingResult_ && !poll) {
- SWIFT_LOG(debug) << "CAPI Certificate detected that the certificate card was removed" << std::endl;
+ SWIFT_LOG(debug) << "CAPI Certificate detected that the certificate card was removed";
onCertificateCardRemoved();
diff --git a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
index 16b0b2b..66b650d 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
@@ -34,3 +34,3 @@ OpenSSLCertificate::OpenSSLCertificate(const ByteArray& der) {
if (!cert) {
-// SWIFT_LOG(warning) << "Error creating certificate from DER data" << std::endl;
+// SWIFT_LOG(warning) << "Error creating certificate from DER data";
}
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
index a183a75..86b0504 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
@@ -209,3 +209,3 @@ static int certVerifyCallback(X509_STORE_CTX* store_ctx, void* arg)
} else {
- SWIFT_LOG(debug) << "certVerifyCallback called but context.verifyCertCallback is unset" << std::endl;
+ SWIFT_LOG(debug) << "certVerifyCallback called but context.verifyCertCallback is unset";
ret = 0;
@@ -252,3 +252,3 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
if (!sslctx) {
- SWIFT_LOG(debug) << "verifyCallback: internal error" << std::endl;
+ SWIFT_LOG(debug) << "verifyCallback: internal error";
return preverifyOk;
@@ -257,3 +257,3 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
if (SSL_CTX_get_verify_mode(sslctx) == SSL_VERIFY_NONE) {
- SWIFT_LOG(debug) << "verifyCallback: no verification required" << std::endl;
+ SWIFT_LOG(debug) << "verifyCallback: no verification required";
// No verification requested
@@ -290,6 +290,6 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
X509_verify_cert_error_string(err) << " depth: " <<
- depth << " issuer: " << ((issuerString.length() > 0) ? issuerString : "<unknown>") << std::endl;
+ depth << " issuer: " << ((issuerString.length() > 0) ? issuerString : "<unknown>");
} else {
SWIFT_LOG(debug) << "verifyCallback: SSL depth: " << depth << " Subject: " <<
- ((subjectString.length() > 0) ? subjectString : "<>") << std::endl;
+ ((subjectString.length() > 0) ? subjectString : "<>");
}
@@ -307,3 +307,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (SSL_CTX_set_cipher_list(context_.get(), cipherSuites.c_str()) != 1 ) {
- SWIFT_LOG(debug) << "Failed to set cipher-suites" << std::endl;
+ SWIFT_LOG(debug) << "Failed to set cipher-suites";
return false;
@@ -318,3 +318,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
contextId.length()) != 1) {
- SWIFT_LOG(debug) << "Failed to set context-id" << std::endl;
+ SWIFT_LOG(debug) << "Failed to set context-id";
return false;
@@ -326,3 +326,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (scto <= 0) {
- SWIFT_LOG(debug) << "Invalid value for session-cache-timeout" << std::endl;
+ SWIFT_LOG(debug) << "Invalid value for session-cache-timeout";
return false;
@@ -331,3 +331,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (SSL_CTX_get_timeout(context_.get()) != scto) {
- SWIFT_LOG(debug) << "Failed to set session-cache-timeout" << std::endl;
+ SWIFT_LOG(debug) << "Failed to set session-cache-timeout";
return false;
@@ -373,3 +373,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (depth <= 0) {
- SWIFT_LOG(debug) << "Invalid value for verify-depth" << std::endl;
+ SWIFT_LOG(debug) << "Invalid value for verify-depth";
return false;
@@ -595,3 +595,3 @@ bool OpenSSLContext::setCertificateChain(const std::vector<std::shared_ptr<Certi
if (certificateChain.size() == 0) {
- SWIFT_LOG(debug) << "Trying to load empty certificate chain." << std::endl;
+ SWIFT_LOG(debug) << "Trying to load empty certificate chain.";
return false;
@@ -618,3 +618,3 @@ bool OpenSSLContext::setCertificateChain(const std::vector<std::shared_ptr<Certi
if (SSL_CTX_add_extra_chain_cert(context_.get(), openSSLCert->getInternalX509().get()) != 1) {
- SWIFT_LOG(debug) << "Trying to load empty certificate chain." << std::endl;
+ SWIFT_LOG(debug) << "Trying to load empty certificate chain.";
return false;
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp b/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp
index 12445fd..e332ca8 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp
@@ -49,3 +49,3 @@ void OpenSSLContextFactory::setCheckCertificateRevocation(bool check) {
if (check) {
- SWIFT_LOG(warning) << "CRL Checking not supported for OpenSSL" << std::endl;
+ SWIFT_LOG(warning) << "CRL Checking not supported for OpenSSL";
assert(false);
@@ -56,3 +56,3 @@ void OpenSSLContextFactory::setDisconnectOnCardRemoval(bool check) {
if (check) {
- SWIFT_LOG(warning) << "Smart cards not supported for OpenSSL" << std::endl;
+ SWIFT_LOG(warning) << "Smart cards not supported for OpenSSL";
}
diff --git a/Swiften/TLS/Schannel/SchannelContext.cpp b/Swiften/TLS/Schannel/SchannelContext.cpp
index c07d009..722fb4a 100644
--- a/Swiften/TLS/Schannel/SchannelContext.cpp
+++ b/Swiften/TLS/Schannel/SchannelContext.cpp
@@ -7,3 +7,3 @@
/*
- * Copyright (c) 2012-2016 Isode Limited.
+ * Copyright (c) 2012-2019 Isode Limited.
* All rights reserved.
@@ -42,6 +42,6 @@ SchannelContext::SchannelContext(bool tls1_0Workaround) : state_(Start), secCont
SchannelContext::~SchannelContext() {
- SWIFT_LOG(debug) << "Destroying SchannelContext" << std::endl;
+ SWIFT_LOG(debug) << "Destroying SchannelContext";
if (myCertStore_) {
if (CertCloseStore(myCertStore_, 0) == FALSE) {
- SWIFT_LOG(debug) << "Failed to close the certificate store" << std::endl;
+ SWIFT_LOG(debug) << "Failed to close the certificate store";
}
@@ -54,3 +54,3 @@ void SchannelContext::determineStreamSizes() {
if (QueryContextAttributes(contextHandle_, SECPKG_ATTR_STREAM_SIZES, &streamSizes_) != SEC_E_OK) {
- SWIFT_LOG(debug) << "QueryContextAttributes failed to determinate the stream size" << std::endl;
+ SWIFT_LOG(debug) << "QueryContextAttributes failed to determinate the stream size";
}
@@ -655,3 +655,3 @@ std::vector<Certificate::ref> SchannelContext::getPeerCertificateChain() const {
if (status != SEC_E_OK) {
- SWIFT_LOG(debug) << "Error while Querying the Certificate Chain" << std::endl;
+ SWIFT_LOG(debug) << "Error while Querying the Certificate Chain";
return certificateChain;
@@ -690,3 +690,3 @@ ByteArray SchannelContext::getFinishMessage() const {
else {
- SWIFT_LOG(debug) << "Error while retrieving Finish Message" << std::endl;
+ SWIFT_LOG(debug) << "Error while retrieving Finish Message";
}
diff --git a/Swiften/TLS/SecureTransport/SecureTransportContext.mm b/Swiften/TLS/SecureTransport/SecureTransportContext.mm
index 25f476f..b4f7842 100644
--- a/Swiften/TLS/SecureTransport/SecureTransportContext.mm
+++ b/Swiften/TLS/SecureTransport/SecureTransportContext.mm
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2015-2016 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -74,3 +74,3 @@ CFArrayRef CreateClientCertificateChainAsCFArrayRef(CertificateWithKey::ref key)
// Password did not work for decoding the certificate.
- SWIFT_LOG(warning) << "Invalid password." << std::endl;
+ SWIFT_LOG(warning) << "Invalid password.";
break;
@@ -78,6 +78,6 @@ CFArrayRef CreateClientCertificateChainAsCFArrayRef(CertificateWithKey::ref key)
// Other decoding error.
- SWIFT_LOG(warning) << "PKCS12 decoding error." << std::endl;
+ SWIFT_LOG(warning) << "PKCS12 decoding error.";
break;
default:
- SWIFT_LOG(warning) << "Unknown error." << std::endl;
+ SWIFT_LOG(warning) << "Unknown error.";
}
@@ -112,3 +112,3 @@ SecureTransportContext::SecureTransportContext(bool checkCertificateRevocation)
if (error != noErr) {
- SWIFT_LOG(error) << "Unable to set IO functions to SSL context." << std::endl;
+ SWIFT_LOG(error) << "Unable to set IO functions to SSL context.";
sslContext_.reset();
@@ -118,3 +118,3 @@ SecureTransportContext::SecureTransportContext(bool checkCertificateRevocation)
if (error != noErr) {
- SWIFT_LOG(error) << "Unable to set connection to SSL context." << std::endl;
+ SWIFT_LOG(error) << "Unable to set connection to SSL context.";
sslContext_.reset();
@@ -125,3 +125,3 @@ SecureTransportContext::SecureTransportContext(bool checkCertificateRevocation)
if (error != noErr) {
- SWIFT_LOG(error) << "Unable to set kSSLSessionOptionBreakOnServerAuth on session." << std::endl;
+ SWIFT_LOG(error) << "Unable to set kSSLSessionOptionBreakOnServerAuth on session.";
sslContext_.reset();
@@ -156,3 +156,3 @@ std::string SecureTransportContext::stateToString(State state) {
void SecureTransportContext::setState(State newState) {
- SWIFT_LOG(debug) << "Switch state from " << stateToString(state_) << " to " << stateToString(newState) << "." << std::endl;
+ SWIFT_LOG(debug) << "Switch state from " << stateToString(state_) << " to " << stateToString(newState) << ".";
state_ = newState;
@@ -161,3 +161,3 @@ void SecureTransportContext::setState(State newState) {
void SecureTransportContext::connect() {
- SWIFT_LOG_ASSERT(state_ == None, error) << "current state '" << stateToString(state_) << " invalid." << std::endl;
+ SWIFT_LOG_ASSERT(state_ == None, error) << "current state '" << stateToString(state_) << " invalid.";
if (clientCertificate_) {
@@ -168,3 +168,3 @@ void SecureTransportContext::connect() {
if (result != noErr) {
- SWIFT_LOG(error) << "SSLSetCertificate failed with error " << result << "." << std::endl;
+ SWIFT_LOG(error) << "SSLSetCertificate failed with error " << result << ".";
}
@@ -176,3 +176,3 @@ void SecureTransportContext::connect() {
void SecureTransportContext::processHandshake() {
- SWIFT_LOG_ASSERT(state_ == None || state_ == Handshake, error) << "current state '" << stateToString(state_) << " invalid." << std::endl;
+ SWIFT_LOG_ASSERT(state_ == None || state_ == Handshake, error) << "current state '" << stateToString(state_) << " invalid.";
OSStatus error = SSLHandshake(sslContext_.get());
@@ -182,3 +182,3 @@ void SecureTransportContext::processHandshake() {
else if (error == noErr) {
- SWIFT_LOG(debug) << "TLS handshake successful." << std::endl;
+ SWIFT_LOG(debug) << "TLS handshake successful.";
setState(HandshakeDone);
@@ -187,3 +187,3 @@ void SecureTransportContext::processHandshake() {
else if (error == errSSLPeerAuthCompleted) {
- SWIFT_LOG(debug) << "Received server certificate. Start verification." << std::endl;
+ SWIFT_LOG(debug) << "Received server certificate. Start verification.";
setState(Handshake);
@@ -192,3 +192,3 @@ void SecureTransportContext::processHandshake() {
else {
- SWIFT_LOG(debug) << "Error returned from SSLHandshake call is " << error << "." << std::endl;
+ SWIFT_LOG(debug) << "Error returned from SSLHandshake call is " << error << ".";
fatalError(nativeToTLSError(error), std::make_shared<CertificateVerificationError>());
@@ -228,9 +228,9 @@ void SecureTransportContext::verifyServerCertificate() {
case kSecTrustResultUnspecified:
- SWIFT_LOG(warning) << "Successful implicit validation. Result unspecified." << std::endl;
+ SWIFT_LOG(warning) << "Successful implicit validation. Result unspecified.";
break;
case kSecTrustResultProceed:
- SWIFT_LOG(warning) << "Validation resulted in explicitly trusted." << std::endl;
+ SWIFT_LOG(warning) << "Validation resulted in explicitly trusted.";
break;
case kSecTrustResultRecoverableTrustFailure:
- SWIFT_LOG(warning) << "recoverable trust failure" << std::endl;
+ SWIFT_LOG(warning) << "recoverable trust failure";
error = SecTrustGetCssmResultCode(trust, &cssmResult);
@@ -306,4 +306,4 @@ bool SecureTransportContext::setClientCertificate(CertificateWithKey::ref cert)
void SecureTransportContext::handleDataFromNetwork(const SafeByteArray& data) {
- SWIFT_LOG(debug) << std::endl;
- SWIFT_LOG_ASSERT(state_ == HandshakeDone || state_ == Handshake, error) << "current state '" << stateToString(state_) << " invalid." << std::endl;
+ SWIFT_LOG(debug);
+ SWIFT_LOG_ASSERT(state_ == HandshakeDone || state_ == Handshake, error) << "current state '" << stateToString(state_) << " invalid.";
@@ -334,3 +334,3 @@ void SecureTransportContext::handleDataFromNetwork(const SafeByteArray& data) {
else {
- SWIFT_LOG(error) << "SSLRead failed with error " << error << ", read bytes: " << bytesRead << "." << std::endl;
+ SWIFT_LOG(error) << "SSLRead failed with error " << error << ", read bytes: " << bytesRead << ".";
fatalError(std::make_shared<TLSError>(), std::make_shared<CertificateVerificationError>());
@@ -349,3 +349,3 @@ void SecureTransportContext::handleDataFromNetwork(const SafeByteArray& data) {
case Error:
- SWIFT_LOG(debug) << "Igoring received data in error state." << std::endl;
+ SWIFT_LOG(debug) << "Igoring received data in error state.";
break;
@@ -360,3 +360,3 @@ void SecureTransportContext::handleDataFromApplication(const SafeByteArray& data
case errSSLWouldBlock:
- SWIFT_LOG(warning) << "Unexpected because the write callback does not block." << std::endl;
+ SWIFT_LOG(warning) << "Unexpected because the write callback does not block.";
return;
@@ -366,3 +366,3 @@ void SecureTransportContext::handleDataFromApplication(const SafeByteArray& data
default:
- SWIFT_LOG(warning) << "SSLWrite returned error code: " << error << ", processed bytes: " << processedBytes << std::endl;
+ SWIFT_LOG(warning) << "SSLWrite returned error code: " << error << ", processed bytes: " << processedBytes;
fatalError(std::make_shared<TLSError>(), std::shared_ptr<CertificateVerificationError>());
@@ -392,3 +392,3 @@ std::vector<Certificate::ref> SecureTransportContext::getPeerCertificateChain()
else {
- SWIFT_LOG(warning) << "Failed to obtain peer trust structure; error = " << error << "." << std::endl;
+ SWIFT_LOG(warning) << "Failed to obtain peer trust structure; error = " << error << ".";
}
@@ -404,3 +404,3 @@ CertificateVerificationError::ref SecureTransportContext::getPeerCertificateVeri
ByteArray SecureTransportContext::getFinishMessage() const {
- SWIFT_LOG(warning) << "Access to TLS handshake finish message is not part of OS X Secure Transport APIs." << std::endl;
+ SWIFT_LOG(warning) << "Access to TLS handshake finish message is not part of OS X Secure Transport APIs.";
return ByteArray();
@@ -455,3 +455,3 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
case CSSMERR_TP_NOT_TRUSTED:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_NOT_TRUSTED" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_NOT_TRUSTED";
error = std::make_shared<CertificateVerificationError>(CertificateVerificationError::Untrusted);
@@ -459,3 +459,3 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
case CSSMERR_TP_CERT_NOT_VALID_YET:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_CERT_NOT_VALID_YET" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_CERT_NOT_VALID_YET";
error = std::make_shared<CertificateVerificationError>(CertificateVerificationError::NotYetValid);
@@ -463,3 +463,3 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
case CSSMERR_TP_CERT_EXPIRED:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_CERT_EXPIRED" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_CERT_EXPIRED";
error = std::make_shared<CertificateVerificationError>(CertificateVerificationError::Expired);
@@ -467,3 +467,3 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
case CSSMERR_TP_CERT_REVOKED:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_CERT_REVOKED" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_CERT_REVOKED";
error = std::make_shared<CertificateVerificationError>(CertificateVerificationError::Revoked);
@@ -471,6 +471,6 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
case CSSMERR_TP_VERIFY_ACTION_FAILED:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_VERIFY_ACTION_FAILED" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_TP_VERIFY_ACTION_FAILED";
break;
case CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK";
if (checkCertificateRevocation_) {
@@ -480,3 +480,3 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
case CSSMERR_APPLETP_OCSP_UNAVAILABLE:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_APPLETP_OCSP_UNAVAILABLE" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_APPLETP_OCSP_UNAVAILABLE";
if (checkCertificateRevocation_) {
@@ -486,3 +486,3 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
case CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE:
- SWIFT_LOG(debug) << "CSSM result code: CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE" << std::endl;
+ SWIFT_LOG(debug) << "CSSM result code: CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE";
error = std::make_shared<CertificateVerificationError>(CertificateVerificationError::InvalidPurpose);
@@ -490,3 +490,3 @@ std::shared_ptr<CertificateVerificationError> SecureTransportContext::CSSMErrorT
default:
- SWIFT_LOG(warning) << "unhandled CSSM error: " << resultCode << ", CSSM_TP_BASE_TP_ERROR: " << CSSM_TP_BASE_TP_ERROR << std::endl;
+ SWIFT_LOG(warning) << "unhandled CSSM error: " << resultCode << ", CSSM_TP_BASE_TP_ERROR: " << CSSM_TP_BASE_TP_ERROR;
error = std::make_shared<CertificateVerificationError>(CertificateVerificationError::UnknownError);
diff --git a/Swiften/TLS/SecureTransport/SecureTransportContextFactory.cpp b/Swiften/TLS/SecureTransport/SecureTransportContextFactory.cpp
index cc10987..ac399e1 100644
--- a/Swiften/TLS/SecureTransport/SecureTransportContextFactory.cpp
+++ b/Swiften/TLS/SecureTransport/SecureTransportContextFactory.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2015-2018 Isode Limited.
+ * Copyright (c) 2015-2019 Isode Limited.
* All rights reserved.
@@ -41,3 +41,3 @@ void SecureTransportContextFactory::setDisconnectOnCardRemoval(bool b) {
if (disconnectOnCardRemoval_) {
- SWIFT_LOG(warning) << "Smart cards have not been tested yet" << std::endl;
+ SWIFT_LOG(warning) << "Smart cards have not been tested yet";
}