summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/ClientSession.cpp6
-rw-r--r--Swiften/Client/ClientSession.h2
-rw-r--r--Swiften/Client/UnitTest/ClientSessionTest.cpp4
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)));
}