mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added missing mutex probably causing crashes when saving directory storage
This commit is contained in:
parent
7a2f02e11a
commit
9718385333
1 changed files with 13 additions and 6 deletions
|
@ -300,13 +300,20 @@ void DirectoryStorage::checkSave()
|
|||
time_t now = time(NULL);
|
||||
|
||||
if(mChanged && mLastSavedTime + MIN_INTERVAL_BETWEEN_REMOTE_DIRECTORY_SAVE < now)
|
||||
{
|
||||
locked_check();
|
||||
{
|
||||
{
|
||||
RS_STACK_MUTEX(mDirStorageMtx) ;
|
||||
locked_check();
|
||||
}
|
||||
|
||||
save(mFileName);
|
||||
mLastSavedTime = now ;
|
||||
mChanged = false ;
|
||||
}
|
||||
save(mFileName);
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mDirStorageMtx) ;
|
||||
mLastSavedTime = now ;
|
||||
mChanged = false ;
|
||||
}
|
||||
}
|
||||
}
|
||||
/******************************************************************************************************************/
|
||||
/* Local Directory Storage */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue