[Pkg-owncloud-commits] [owncloud-client] 120/164: Disable parallel uploads for server versions <= 8.0.2

Sandro Knauß hefee-guest at moszumanska.debian.org
Sun Mar 22 11:57:01 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 4a01644625c622bb28a7f25e0c64b8692337dd92
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Mar 11 11:31:51 2015 +0100

    Disable parallel uploads for server versions <= 8.0.2
    
    Issue #2938
---
 src/libsync/propagateupload.cpp | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/libsync/propagateupload.cpp b/src/libsync/propagateupload.cpp
index 1d2fccf..49b213d 100644
--- a/src/libsync/propagateupload.cpp
+++ b/src/libsync/propagateupload.cpp
@@ -422,18 +422,14 @@ void PropagateUploadFileQNAM::startNextChunk()
         parallelChunkUpload = env != "false" && env != "0";
     } else {
         auto version = _propagator->account()->serverVersion();
-        auto dotPos = version.indexOf('.');
-        if (dotPos > 0) {
-            if (version.leftRef(dotPos)
-#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
-                    .toString()  // QStringRef::toInt was added in Qt 5.1
-#endif
-                    .toInt() < 8) {
-
-                // Disable parallel chunk upload on older sever to avoid too many
-                // internal sever errors (#2743)
-                parallelChunkUpload = false;
-            }
+        auto components = version.split('.');
+        int versionNum = (components.value(0).toInt() << 16)
+                       + (components.value(1).toInt() << 8)
+                       + components.value(2).toInt();
+        if (versionNum < 0x080003) {
+            // Disable parallel chunk upload severs older than 8.0.3 to avoid too many
+            // internal sever errors (#2743, #2938)
+            parallelChunkUpload = false;
         }
     }
 

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