diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-01-22 13:31:54 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-01-22 13:31:54 (GMT) |
commit | 940cb5e744564ec15b805a9e5388e1fa5c60d703 (patch) | |
tree | 9c5ed10128c5869c99dbeacc251234802ffbf53b /Swiften/Client | |
parent | 7de0bdc001ab361b26dc50add7b48e49f87ac755 (diff) | |
download | swift-contrib-940cb5e744564ec15b805a9e5388e1fa5c60d703.zip swift-contrib-940cb5e744564ec15b805a9e5388e1fa5c60d703.tar.bz2 |
Renaming SessionStream::onError to SessionStream::onClosed.
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/ClientSession.cpp | 6 | ||||
-rw-r--r-- | Swiften/Client/ClientSession.h | 2 | ||||
-rw-r--r-- | Swiften/Client/UnitTest/ClientSessionTest.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index d4cf065..9400b56 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -62,7 +62,7 @@ ClientSession::~ClientSession() { void ClientSession::start() { stream->onStreamStartReceived.connect(boost::bind(&ClientSession::handleStreamStart, shared_from_this(), _1)); stream->onElementReceived.connect(boost::bind(&ClientSession::handleElement, shared_from_this(), _1)); - stream->onError.connect(boost::bind(&ClientSession::handleStreamError, shared_from_this(), _1)); + stream->onClosed.connect(boost::bind(&ClientSession::handleStreamFinished, shared_from_this(), _1)); stream->onTLSEncrypted.connect(boost::bind(&ClientSession::handleTLSEncrypted, shared_from_this())); assert(state == Initial); @@ -367,7 +367,7 @@ void ClientSession::continueAfterTLSEncrypted() { sendStreamHeader(); } -void ClientSession::handleStreamError(boost::shared_ptr<Swift::Error> error) { +void ClientSession::handleStreamFinished(boost::shared_ptr<Swift::Error> error) { finishSession(error); } @@ -393,7 +393,7 @@ void ClientSession::finishSession(boost::shared_ptr<Swift::Error> error) { stream->setWhitespacePingEnabled(false); stream->onStreamStartReceived.disconnect(boost::bind(&ClientSession::handleStreamStart, shared_from_this(), _1)); stream->onElementReceived.disconnect(boost::bind(&ClientSession::handleElement, shared_from_this(), _1)); - stream->onError.disconnect(boost::bind(&ClientSession::handleStreamError, shared_from_this(), _1)); + stream->onClosed.disconnect(boost::bind(&ClientSession::handleStreamFinished, shared_from_this(), _1)); stream->onTLSEncrypted.disconnect(boost::bind(&ClientSession::handleTLSEncrypted, shared_from_this())); if (stream->isAvailable()) { stream->writeFooter(); diff --git a/Swiften/Client/ClientSession.h b/Swiften/Client/ClientSession.h index b779735..f35c298 100644 --- a/Swiften/Client/ClientSession.h +++ b/Swiften/Client/ClientSession.h @@ -115,7 +115,7 @@ namespace Swift { void handleElement(boost::shared_ptr<Element>); void handleStreamStart(const ProtocolHeader&); - void handleStreamError(boost::shared_ptr<Swift::Error>); + void handleStreamFinished(boost::shared_ptr<Swift::Error>); void handleTLSEncrypted(); diff --git a/Swiften/Client/UnitTest/ClientSessionTest.cpp b/Swiften/Client/UnitTest/ClientSessionTest.cpp index 358e308..2b0241a 100644 --- a/Swiften/Client/UnitTest/ClientSessionTest.cpp +++ b/Swiften/Client/UnitTest/ClientSessionTest.cpp @@ -349,11 +349,11 @@ class ClientSessionTest : public CppUnit::TestFixture { } void breakConnection() { - onError(boost::shared_ptr<SessionStream::Error>(new SessionStream::Error(SessionStream::Error::ConnectionReadError))); + onClosed(boost::shared_ptr<SessionStream::Error>(new SessionStream::Error(SessionStream::Error::ConnectionReadError))); } void breakTLS() { - onError(boost::shared_ptr<SessionStream::Error>(new SessionStream::Error(SessionStream::Error::TLSError))); + onClosed(boost::shared_ptr<SessionStream::Error>(new SessionStream::Error(SessionStream::Error::TLSError))); } |