From cf908674ce942a943fdddf08e56c3ad08021010a Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 11 Sep 2017 21:50:08 +0200 Subject: [PATCH] Fix unitialized value in LocalDirectoryUpdater. --- .../src/file_sharing/directory_updater.cc | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/libretroshare/src/file_sharing/directory_updater.cc b/libretroshare/src/file_sharing/directory_updater.cc index 609371e39..be8561246 100644 --- a/libretroshare/src/file_sharing/directory_updater.cc +++ b/libretroshare/src/file_sharing/directory_updater.cc @@ -36,20 +36,14 @@ //=============================================================================================================// LocalDirectoryUpdater::LocalDirectoryUpdater(HashStorage *hc,LocalDirectoryStorage *lds) - : mHashCache(hc),mSharedDirectories(lds) + : mHashCache(hc), mSharedDirectories(lds) + , mLastSweepTime(0), mLastTSUpdateTime(0) + , mDelayBetweenDirectoryUpdates(DELAY_BETWEEN_DIRECTORY_UPDATES) + , mIsEnabled(false), mFollowSymLinks(FOLLOW_SYMLINKS_DEFAULT) + /* Can be left to false, but setting it to true will force to re-hash any file that has been left unhashed in the last session.*/ + , mNeedsFullRecheck(true) + , mIsChecking(false), mForceUpdate(false), mIgnoreFlags (0) { - mLastSweepTime = 0; - mLastTSUpdateTime = 0; - - mDelayBetweenDirectoryUpdates = DELAY_BETWEEN_DIRECTORY_UPDATES; - mIsEnabled = false ; - mFollowSymLinks = FOLLOW_SYMLINKS_DEFAULT ; - - // Can be left to false, but setting it to true will force to re-hash any file that has been left unhashed in the last session. - - mNeedsFullRecheck = true ; - mIsChecking = false ; - mForceUpdate = false ; } bool LocalDirectoryUpdater::isEnabled() const