diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-06 11:50:46 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-06 11:50:46 (GMT) |
commit | 90a511ed523cfaf500dd27316b12e128e0c70ce3 (patch) | |
tree | 24c9505dcf3ed364794fbf834c663feaade4a564 /Swiften/Client/ClientSession.cpp | |
parent | 0468ee852e54f81043ff9589951c1d9f88a1848e (diff) | |
download | swift-contrib-90a511ed523cfaf500dd27316b12e128e0c70ce3.zip swift-contrib-90a511ed523cfaf500dd27316b12e128e0c70ce3.tar.bz2 |
Only assume we are logged in when we have bound our resource.
Resolves: #758
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r-- | Swiften/Client/ClientSession.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index 9950a76..49334a3 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -225,7 +225,13 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) { needSessionStart = streamFeatures->hasSession(); needResourceBind = streamFeatures->hasResourceBind(); needAcking = streamFeatures->hasStreamManagement(); - continueSessionInitialization(); + if (!needResourceBind) { + // Resource binding is a MUST + finishSession(Error::ResourceBindError); + } + else { + continueSessionInitialization(); + } } } else if (boost::dynamic_pointer_cast<Compressed>(element)) { |