From 05eda1dd322e338bf2931d5bf5f455af534356b1 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sat, 9 Mar 2013 15:16:29 +0100 Subject: Disable Facebook / Google / Facebook specific mechanisms if we do not have the corresponding credentials. Google recently changed their XMPP servers, and X-OAUTH2 is now listed before PLAIN. QXmpp was failing to connect to their servers. --- src/client/QXmppOutgoingClient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/client/QXmppOutgoingClient.cpp') diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index bb6f0740..f9d7c7df 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -377,6 +377,12 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv) // supported and preferred SASL auth mechanisms QStringList supportedMechanisms = QXmppSaslClient::availableMechanisms(); const QString preferredMechanism = configuration().saslAuthMechanism(); + if (configuration().facebookAppId().isEmpty() || configuration().facebookAccessToken().isEmpty()) + supportedMechanisms.removeAll("X-FACEBOOK-PLATFORM"); + if (configuration().windowsLiveAccessToken().isEmpty()) + supportedMechanisms.removeAll("X-MESSENGER-OAUTH2"); + if (configuration().googleAccessToken().isEmpty()) + supportedMechanisms.removeAll("X-OAUTH2"); // determine SASL Authentication mechanism to use QStringList commonMechanisms; -- cgit v1.2.3