SyncJournalDb::updateErrorBlacklistEntry: lock the mutext at the beginning

The mutex need to be locked before checkConnect, that's what all the other functions are doing
This commit is contained in:
Olivier Goffart 2015-05-20 15:30:19 +02:00
parent 6a7f2089e8
commit d148464efe

View file

@ -1164,12 +1164,11 @@ void SyncJournalDb::wipeErrorBlacklistEntry( const QString& file )
void SyncJournalDb::updateErrorBlacklistEntry( const SyncJournalErrorBlacklistRecord& item )
{
QMutexLocker locker(&_mutex);
if( !checkConnect() ) {
return;
}
QMutexLocker locker(&_mutex);
_setErrorBlacklistQuery->bindValue(1, item._file);
_setErrorBlacklistQuery->bindValue(2, item._lastTryEtag);
_setErrorBlacklistQuery->bindValue(3, QString::number(item._lastTryModtime));