[Pkg-owncloud-commits] [owncloud-client] 356/484: Use the configuration value of remotePollInterval rather than hardcoded.

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:38:04 UTC 2015


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 60598c0d345ecb0171ec4d4c768cbe1683dee973
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Tue Oct 20 09:25:42 2015 +0200

    Use the configuration value of remotePollInterval rather than hardcoded.
---
 src/gui/accountstate.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index 12c565d..537b276 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -16,6 +16,7 @@
 #include "account.h"
 #include "creds/abstractcredentials.h"
 #include "logger.h"
+#include "configfile.h"
 
 #include <QDebug>
 #include <QSettings>
@@ -154,8 +155,11 @@ void AccountState::checkConnectivity(CredentialFetchMode credentialsFetchMode)
 
     // IF the account is connected the connection check can be skipped
     // if the last successful etag check job is not so long ago.
+    ConfigFile cfg;
+    int polltime = cfg.remotePollInterval();
+
     if (isConnected() && _timeSinceLastETagCheck.isValid()
-            && _timeSinceLastETagCheck.elapsed() < 30*1000) {
+            && _timeSinceLastETagCheck.elapsed() < polltime) {
         qDebug() << "The last ETag check succeeded within the last 30 secs. No connection check needed!";
         return;
     }

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