Remove duplicate SyncFileItem entries for the log

The accuracy of that log isn't as important as the few bytes those
fields take as hostage for the whole sync.
This commit is contained in:
Jocelyn Turcotte 2017-01-25 14:53:10 +01:00
parent 2bda55be81
commit b0700ebbab
3 changed files with 6 additions and 17 deletions

View file

@ -146,17 +146,17 @@ void SyncRunFileLog::logItem( const SyncFileItem& item )
const QChar L = QLatin1Char('|'); const QChar L = QLatin1Char('|');
_out << ts << L; _out << ts << L;
_out << QString::number(item._requestDuration) << L; _out << QString::number(item._requestDuration) << L;
if( item.log._instruction != CSYNC_INSTRUCTION_RENAME ) { if( item._instruction != CSYNC_INSTRUCTION_RENAME ) {
_out << item._file << L; _out << item._file << L;
} else { } else {
_out << item._file << QLatin1String(" -> ") << item._renameTarget << L; _out << item._file << QLatin1String(" -> ") << item._renameTarget << L;
} }
_out << instructionToStr( item.log._instruction ) << L; _out << instructionToStr( item._instruction ) << L;
_out << directionToStr( item._direction ) << L; _out << directionToStr( item._direction ) << L;
_out << QString::number(item.log._modtime) << L; _out << QString::number(item._modtime) << L;
_out << item.log._etag << L; _out << item._etag << L;
_out << QString::number(item.log._size) << L; _out << QString::number(item._size) << L;
_out << item.log._fileId << L; _out << item._fileId << L;
_out << item._status << L; _out << item._status << L;
_out << item._errorString << L; _out << item._errorString << L;
_out << QString::number(item._httpErrorCode) << L; _out << QString::number(item._httpErrorCode) << L;

View file

@ -653,12 +653,6 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
_needsUpdate = true; _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_etag = file->other.etag;
item->log._other_fileId = file->other.file_id; item->log._other_fileId = file->other.file_id;
item->log._other_instruction = file->other.instruction; item->log._other_instruction = file->other.instruction;

View file

@ -179,15 +179,10 @@ public:
QString _directDownloadCookies; QString _directDownloadCookies;
struct { struct {
quint64 _size;
time_t _modtime;
QByteArray _etag;
QByteArray _fileId;
quint64 _other_size; quint64 _other_size;
time_t _other_modtime; time_t _other_modtime;
QByteArray _other_etag; QByteArray _other_etag;
QByteArray _other_fileId; QByteArray _other_fileId;
enum csync_instructions_e _instruction BITFIELD(16);
enum csync_instructions_e _other_instruction BITFIELD(16); enum csync_instructions_e _other_instruction BITFIELD(16);
} log; } log;
}; };