diff options
Diffstat (limited to 'Swiften/Network')
| -rw-r--r-- | Swiften/Network/BOSHConnection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index 23772eb..83f12f7 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -1,17 +1,17 @@ /* * Copyright (c) 2011 Thilo Cestonaro * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ /* - * Copyright (c) 2011 Kevin Smith + * Copyright (c) 2011-2014 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #include <Swiften/Network/BOSHConnection.h> #include <boost/bind.hpp> #include <boost/thread.hpp> #include <boost/lexical_cast.hpp> @@ -129,19 +129,19 @@ void BOSHConnection::write(const SafeByteArray& data, bool streamRestart, bool t onBOSHDataWritten(safeHeader); connection_->write(safeHeader); pending_ = true; SWIFT_LOG(debug) << "write data: " << safeByteArrayToString(safeHeader) << std::endl; } void BOSHConnection::handleConnectFinished(Connection::ref connection) { cancelConnector(); - connectionReady_ = connection; + connectionReady_ = !!connection; if (connectionReady_) { connection_ = connection; connection_->onDataRead.connect(boost::bind(&BOSHConnection::handleDataRead, shared_from_this(), _1)); connection_->onDisconnected.connect(boost::bind(&BOSHConnection::handleDisconnected, shared_from_this(), _1)); } onConnectFinished(!connectionReady_); } void BOSHConnection::startStream(const std::string& to, unsigned long long rid) { |
Swift