Propagator: Added a log that tells if transmission checksumming is used.
authorKlaas Freitag <freitag@owncloud.com>
Wed, 20 May 2015 10:27:54 +0000 (12:27 +0200)
committerKlaas Freitag <freitag@owncloud.com>
Wed, 20 May 2015 10:27:54 +0000 (12:27 +0200)
src/libsync/owncloudpropagator.cpp

index 1ccefaf59c2187c89f6c9de63181a63ed2d9f719..c7826888d718b3d99fcc8ed1439f27e7f293b082 100644 (file)
@@ -259,6 +259,21 @@ void OwncloudPropagator::start(const SyncFileItemVector& items)
 {
     Q_ASSERT(std::is_sorted(items.begin(), items.end()));
 
+    /* Check and log the transmission checksum type */
+    ConfigFile cfg;
+    const QString checksumType = cfg.transmissionChecksum().toUpper();
+
+    /* if the checksum type is empty, it is not send. No error */
+    if( !checksumType.isEmpty() ) {
+        if( checksumType == checkSumAdlerUpperC ||
+                checksumType == checkSumMD5C    ||
+                checksumType == checkSumSHA1C ) {
+            qDebug() << "Client sends and expects transmission checksum type" << checksumType;
+        } else {
+            qDebug() << "WARN: Unknown transmission checksum type from config" << checksumType;
+        }
+    }
+
     /* This builds all the job needed for the propagation.
      * Each directories is a PropagateDirectory job, which contains the files in it.
      * In order to do that we loop over the items. (which are sorted by destination)