diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-03 13:50:21 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-03 13:50:21 +0200 |
| commit | d51c6b146d8ca9d1a39bf2fbb6b7d5124dedf09b (patch) | |
| tree | e561fc568dc844304974382825144d29225900b5 /src/client/QXmppOutgoingClient.cpp | |
| parent | 088cf8e7232a25b31d8acc447e2224bc147b5411 (diff) | |
| download | qxmpp-d51c6b146d8ca9d1a39bf2fbb6b7d5124dedf09b.tar.gz | |
make it possible to disable non-SASL authentication
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 |
