[Pkg-owncloud-commits] [owncloud-client] 18/30: Revert "Do not wipe the credentials from config for reconnect."

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Mar 15 21:28:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 76b24ff00d14d4412ae46671d558bd89ef971163
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Mar 3 17:21:20 2014 +0100

    Revert "Do not wipe the credentials from config for reconnect."
    
    This reverts commit 9eb3452a71cc98200022275101b728e910371897.
    
    We need that or wrong password can never be changed
---
 src/mirall/networkjobs.cpp | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/mirall/networkjobs.cpp b/src/mirall/networkjobs.cpp
index f739f40..040d0f1 100644
--- a/src/mirall/networkjobs.cpp
+++ b/src/mirall/networkjobs.cpp
@@ -145,20 +145,13 @@ void AbstractNetworkJob::slotFinished()
     AbstractCredentials *creds = _account->credentials();
     if (!creds->stillValid(_reply) &&! _ignoreCredentialFailure
             && _account->state() != Account::InvalidCredidential) {
+        _account->setState(Account::InvalidCredidential);
+
         // invalidate & forget token/password
         // but try to re-sign in.
         connect( creds, SIGNAL(fetched()),
                  qApp, SLOT(slotCredentialsFetched()), Qt::UniqueConnection);
-
-        // If the state is (still) disconnected, it is the first attempt to connect and
-        // the credentials must be fetched.
-        if(_account->state() == Account::Disconnected) {
-            creds->fetch(_account);
-        } else {
-            // Note: Invalidate removes the creds from the keychain!
-            creds->invalidateAndFetch(_account);   // this triggers Application::runValidator when the credidentials are fetched
-        }
-        _account->setState(Account::InvalidCredidential);
+        creds->invalidateAndFetch(_account);   // this triggers Application::runValidator when the credidentials are fetched
     }
     deleteLater();
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list