[SCM] ktp-auth-handler packaging branch, master, updated. debian/15.12.1-2-282-g080758e
Maximiliano Curia
maxy at moszumanska.debian.org
Fri May 27 23:58:23 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-auth-handler.git;a=commitdiff;h=d8c783e
The following commit has been merged in the master branch:
commit d8c783e45f3adce0b7203f08e667a9fef2941980
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Thu Oct 27 02:12:02 2011 +0200
Save lastLoginFailed entry in KWallet
This allows to prompt for the password if canTryAgain is false and the
stored password is false
BUG: 284419
---
sasl-auth-op.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sasl-auth-op.cpp b/sasl-auth-op.cpp
index ebefb30..27c648d 100644
--- a/sasl-auth-op.cpp
+++ b/sasl-auth-op.cpp
@@ -85,14 +85,18 @@ void SaslAuthOp::gotProperties(Tp::PendingOperation *op)
void SaslAuthOp::onSASLStatusChanged(uint status, const QString &reason,
const QVariantMap &details)
{
+ KTelepathy::WalletInterface wallet(0);
if (status == Tp::SASLStatusNotStarted) {
kDebug() << "Requesting password";
- promptUser(true);
+ promptUser (m_canTryAgain || !wallet.hasEntry(m_account, QLatin1String("lastLoginFailed")));
} else if (status == Tp::SASLStatusServerSucceeded) {
kDebug() << "Authentication handshake";
m_saslIface->AcceptSASL();
} else if (status == Tp::SASLStatusSucceeded) {
kDebug() << "Authentication succeeded";
+ if (wallet.hasEntry(m_account, QLatin1String("lastLoginFailed"))) {
+ wallet.removeEntry(m_account, QLatin1String("lastLoginFailed"));
+ }
m_channel->requestClose();
setFinished();
} else if (status == Tp::SASLStatusInProgress) {
@@ -105,6 +109,7 @@ void SaslAuthOp::onSASLStatusChanged(uint status, const QString &reason,
promptUser(false);
} else {
kWarning() << "Authentication failed and cannot try again";
+ wallet.setEntry(m_account, QLatin1String("lastLoginFailed"), QLatin1String("true"));
m_channel->requestClose();
QString errorMessage = details[QLatin1String("server-message")].toString();
setFinishedWithError(reason, errorMessage.isEmpty() ? i18n("Authentication error") : errorMessage);
--
ktp-auth-handler packaging
More information about the pkg-kde-commits
mailing list