diff options
author | Kevin Smith <git@kismith.co.uk> | 2014-08-21 08:38:11 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2014-08-21 08:40:10 (GMT) |
commit | 381b22fc365c27b9cd585f4b78f53ebc698d9f54 (patch) | |
tree | 0ffd89a8be13293c75c7ddfea524c74e0bf87b72 /Swiften/Network | |
parent | 8ec22a9c5591584fd1725ed028d714c51b7509d3 (diff) | |
download | swift-381b22fc365c27b9cd585f4b78f53ebc698d9f54.zip swift-381b22fc365c27b9cd585f4b78f53ebc698d9f54.tar.bz2 |
Clean up compilation errors in Swiften due to boost 1.56
Can no longer implicitly convert boost::optional to bool temporaries. Also fixed assorted uses of cerr where logging was appropriate.
Test-Information:
Swiften compiles against boost 1.56 (link fails for me so far)
Change-Id: Iec058af933a82a987da64291435a475f8b40ef96
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/BOSHConnection.cpp | 2 | ||||
-rw-r--r-- | Swiften/Network/FakeConnection.cpp | 4 | ||||
-rw-r--r-- | Swiften/Network/NATPMPInterface.cpp | 8 |
3 files changed, 10 insertions, 4 deletions
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index bde689e..28e27d5 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -285,7 +285,7 @@ void BOSHConnection::setSID(const std::string& sid) { void BOSHConnection::handleDisconnected(const boost::optional<Connection::Error>& error) { cancelConnector(); - onDisconnected(error); + onDisconnected(error ? true : false); sid_ = ""; connectionReady_ = false; } diff --git a/Swiften/Network/FakeConnection.cpp b/Swiften/Network/FakeConnection.cpp index be5555c..a84c92e 100644 --- a/Swiften/Network/FakeConnection.cpp +++ b/Swiften/Network/FakeConnection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -43,7 +43,7 @@ void FakeConnection::connect(const HostAddressPort& address) { state = DisconnectedWithError; } eventLoop->postEvent( - boost::bind(boost::ref(onConnectFinished), error), + boost::bind(boost::ref(onConnectFinished), error ? true : false), shared_from_this()); } } diff --git a/Swiften/Network/NATPMPInterface.cpp b/Swiften/Network/NATPMPInterface.cpp index c7a41ff..dcae641 100644 --- a/Swiften/Network/NATPMPInterface.cpp +++ b/Swiften/Network/NATPMPInterface.cpp @@ -4,6 +4,12 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* +* Copyright (c) 2014 Kevin Smith +* Licensed under the GNU General Public License v3. +* See Documentation/Licenses/GPLv3.txt for more information. +*/ + #include <Swiften/Network/NATPMPInterface.h> #include <boost/smart_ptr/make_shared.hpp> @@ -32,7 +38,7 @@ NATPMPInterface::~NATPMPInterface() { } bool NATPMPInterface::isAvailable() { - return getPublicIP(); + return getPublicIP() ? true : false; } boost::optional<HostAddress> NATPMPInterface::getPublicIP() { |