diff options
Diffstat (limited to 'src/client/QXmppOutgoingClient.cpp')
| -rw-r--r-- | src/client/QXmppOutgoingClient.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index c3e6c1f9..370cd2aa 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -353,13 +353,7 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv) // handle authentication const bool nonSaslAvailable = features.nonSaslAuthMode() != QXmppStreamFeatures::Disabled; const bool saslAvailable = !features.authMechanisms().isEmpty(); - const bool useSasl = configuration().useSASLAuthentication(); - if((saslAvailable && nonSaslAvailable && !useSasl) || - (!saslAvailable && nonSaslAvailable)) - { - sendNonSASLAuthQuery(); - } - else if(saslAvailable) + if (saslAvailable && configuration().useSASLAuthentication()) { // supported and preferred SASL auth mechanisms const QStringList supportedMechanisms = QXmppSaslClient::availableMechanisms(); @@ -410,6 +404,8 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv) return; } sendPacket(QXmppSaslAuth(d->saslClient->mechanism(), response)); + } else if(nonSaslAvailable && configuration().useNonSASLAuthentication()) { + sendNonSASLAuthQuery(); } // check whether bind is available |
