[Pkg-owncloud-commits] [owncloud-client] 274/333: let configure the default count of the blacklist

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:17:03 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 607e48a68bab65b4905a1dd97c97966c6e7648bb
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Apr 1 13:54:47 2014 +0200

    let configure the default count of the blacklist
---
 src/mirall/owncloudpropagator.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index e8cb618..07ac9c8 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -45,7 +45,11 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
         qDebug() << "Fatal Error condition" << _item._httpErrorCode << ", forbid retry!";
         retries = -1;
     } else {
-        retries = 3; // FIXME: good number of allowed retries?
+        static QAtomicInt defaultRetriesCount(qgetenv("OWNCLOUD_BLACKLIST_COUNT").toInt());
+        if (defaultRetriesCount.fetchAndAddAcquire(0) <= 0) {
+            defaultRetriesCount.fetchAndStoreRelease(3);
+        }
+        retries = defaultRetriesCount.fetchAndAddAcquire(0);
     }
     SyncJournalBlacklistRecord record(_item, retries);;
 

-- 
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