diff options
-rw-r--r-- | Swiften/Component/ComponentSession.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/Component/ComponentSession.cpp b/Swiften/Component/ComponentSession.cpp index 51d9d15..3269f23 100644 --- a/Swiften/Component/ComponentSession.cpp +++ b/Swiften/Component/ComponentSession.cpp @@ -11,4 +11,5 @@ #include <Swiften/Elements/ProtocolHeader.h> +#include <Swiften/Elements/StreamFeatures.h> #include <Swiften/Elements/ComponentHandshake.h> #include <Swiften/Session/SessionStream.h> @@ -67,7 +68,12 @@ void ComponentSession::handleElement(boost::shared_ptr<Element> element) { } else if (getState() == Authenticating) { + if (boost::dynamic_pointer_cast<StreamFeatures>(element)) { + // M-Link sends stream features, so swallow that. + } + else { // FIXME: We should actually check the element received finishSession(Error::AuthenticationFailedError); } + } else { finishSession(Error::UnexpectedElementError); |