Remove duplicate SyncFileItem entries for the log
authorJocelyn Turcotte <jturcotte@woboq.com>
Wed, 25 Jan 2017 13:53:10 +0000 (14:53 +0100)
committerJocelyn Turcotte <jturcotte@woboq.com>
Thu, 26 Jan 2017 16:13:54 +0000 (17:13 +0100)
The accuracy of that log isn't as important as the few bytes those
fields take as hostage for the whole sync.

src/gui/syncrunfilelog.cpp
src/libsync/syncengine.cpp
src/libsync/syncfileitem.h

index 13d7bdf990dc4bfce7c52a765ee3cfb66de135c6..7e2877e3dfbb1b5f5344614eaaa20d85504e528c 100644 (file)
@@ -146,17 +146,17 @@ void SyncRunFileLog::logItem( const SyncFileItem& item )
     const QChar L = QLatin1Char('|');
     _out << ts << L;
     _out << QString::number(item._requestDuration) << L;
-    if( item.log._instruction != CSYNC_INSTRUCTION_RENAME ) {
+    if( item._instruction != CSYNC_INSTRUCTION_RENAME ) {
         _out << item._file << L;
     } else {
         _out << item._file << QLatin1String(" -> ") << item._renameTarget << L;
     }
-    _out << instructionToStr( item.log._instruction ) << L;
+    _out << instructionToStr( item._instruction ) << L;
     _out << directionToStr( item._direction ) << L;
-    _out << QString::number(item.log._modtime) << L;
-    _out << item.log._etag << L;
-    _out << QString::number(item.log._size) << L;
-    _out << item.log._fileId << L;
+    _out << QString::number(item._modtime) << L;
+    _out << item._etag << L;
+    _out << QString::number(item._size) << L;
+    _out << item._fileId << L;
     _out << item._status << L;
     _out << item._errorString << L;
     _out << QString::number(item._httpErrorCode) << L;
index ce44878ccbe9138591616784ab6da786861617cc..462c6b268e79e816f21a016dc570049526a8d6ac 100644 (file)
@@ -653,12 +653,6 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
 
     _needsUpdate = true;
 
-    item->log._etag          = file->etag;
-    item->log._fileId        = file->file_id;
-    item->log._instruction   = file->instruction;
-    item->log._modtime       = file->modtime;
-    item->log._size          = file->size;
-
     item->log._other_etag        = file->other.etag;
     item->log._other_fileId      = file->other.file_id;
     item->log._other_instruction = file->other.instruction;
index 414763aea0d4604cc44a418fc4a97d784e88e5ee..221dbfd2f88eebada4e74e8178b0e5551cf59fda 100644 (file)
@@ -179,15 +179,10 @@ public:
     QString              _directDownloadCookies;
 
     struct {
-        quint64     _size;
-        time_t      _modtime;
-        QByteArray  _etag;
-        QByteArray  _fileId;
         quint64     _other_size;
         time_t      _other_modtime;
         QByteArray  _other_etag;
         QByteArray  _other_fileId;
-        enum csync_instructions_e _instruction BITFIELD(16);
         enum csync_instructions_e _other_instruction BITFIELD(16);
     } log;
 };