[Pkg-owncloud-commits] [owncloud-client] 182/484: Checksum: Fixes after review

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:41 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 566131209d1e5ed1eeb17fca382552662a770466
Author: Christian Kamm <mail at ckamm.de>
Date:   Wed Oct 28 14:22:29 2015 +0100

    Checksum: Fixes after review
---
 src/libsync/capabilities.cpp    | 4 ++--
 src/libsync/capabilities.h      | 2 +-
 src/libsync/propagateupload.cpp | 4 ++++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/libsync/capabilities.cpp b/src/libsync/capabilities.cpp
index 81f8d98..202be49 100644
--- a/src/libsync/capabilities.cpp
+++ b/src/libsync/capabilities.cpp
@@ -65,14 +65,14 @@ bool Capabilities::shareResharing() const
     return _capabilities["files_sharing"].toMap()["resharing"].toBool();
 }
 
-QList<QByteArray> Capabilities::supportedChecksumTypesRaw() const
+QList<QByteArray> Capabilities::supportedChecksumTypesAdvertised() const
 {
     return QList<QByteArray>();
 }
 
 QList<QByteArray> Capabilities::supportedChecksumTypes() const
 {
-    auto list = supportedChecksumTypesRaw();
+    auto list = supportedChecksumTypesAdvertised();
     QByteArray cfgType = ConfigFile().transmissionChecksum().toLatin1();
     if (!cfgType.isEmpty()) {
         list.prepend(cfgType);
diff --git a/src/libsync/capabilities.h b/src/libsync/capabilities.h
index 7f0984c..963c4cb 100644
--- a/src/libsync/capabilities.h
+++ b/src/libsync/capabilities.h
@@ -41,7 +41,7 @@ public:
     bool shareResharing() const;
 
     /// Returns the checksum types the server explicitly advertises
-    QList<QByteArray> supportedChecksumTypesRaw() const;
+    QList<QByteArray> supportedChecksumTypesAdvertised() const;
 
     /// Like supportedChecksumTypesRaw(), but includes the type from the config
     QList<QByteArray> supportedChecksumTypes() const;
diff --git a/src/libsync/propagateupload.cpp b/src/libsync/propagateupload.cpp
index 10724a4..eb509a2 100644
--- a/src/libsync/propagateupload.cpp
+++ b/src/libsync/propagateupload.cpp
@@ -213,6 +213,10 @@ void PropagateUploadFileQNAM::start()
 
     // If we already have a checksum header and the checksum type is supported
     // by the server, we keep that - otherwise recompute.
+    //
+    // Note: Currently we *always* recompute because we usually only upload
+    // files that have changed and thus have a new checksum. But if an earlier
+    // phase computed a checksum, this is where we would make use of it.
     if (!_item->_transmissionChecksumType.isEmpty()) {
         if (supportedChecksumTypes.contains(_item->_transmissionChecksumType)) {
             // TODO: We could validate the old checksum and thereby determine whether

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