VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-09-29 12:44:22 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-09-29 14:07:28 (GMT)
commit909255d55f7c7e4884a33c932fb4665b5cf944e9 (patch)
tree703e13692b400f56dc6d3a8218f26614ee9f2e4f /src/Common
parent7d88577c610b4c92817e8b539af8fb8f57cf7428 (diff)
downloadVeraCrypt-909255d55f7c7e4884a33c932fb4665b5cf944e9.zip
VeraCrypt-909255d55f7c7e4884a33c932fb4665b5cf944e9.tar.gz
Windows: Use periodic update of connected devices only if there is a Favorite that uses VolumeID. Add command option to disable the period update of devices.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Dlgcode.c5
-rw-r--r--src/Common/Dlgcode.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 66a22a2..495d32b 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -188,6 +188,9 @@ BOOL MountVolumesAsSystemFavorite = FALSE;
BOOL FavoriteMountOnArrivalInProgress = FALSE;
BOOL MultipleMountOperationInProgress = FALSE;
+volatile BOOL NeedPeriodicDeviceListUpdate = FALSE;
+BOOL DisablePeriodicDeviceListUpdate = FALSE;
+
BOOL WaitDialogDisplaying = FALSE;
/* Handle to the device driver */
@@ -12530,7 +12533,7 @@ wstring FindDeviceByVolumeID (const BYTE volumeID [VOLUME_ID_SIZE], BOOL bFromSe
/* not mounted. Look for it in the local drives*/
- if (bFromService)
+ if (bFromService || !NeedPeriodicDeviceListUpdate)
{
for (int devNumber = 0; devNumber < MAX_HOST_DRIVE_NUMBER; devNumber++)
{
diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h
index 5ff97af..3df6822 100644
--- a/src/Common/Dlgcode.h
+++ b/src/Common/Dlgcode.h
@@ -165,6 +165,9 @@ extern BOOL MountVolumesAsSystemFavorite;
extern BOOL FavoriteMountOnArrivalInProgress;
extern BOOL MultipleMountOperationInProgress;
+extern volatile BOOL NeedPeriodicDeviceListUpdate;
+extern BOOL DisablePeriodicDeviceListUpdate;
+
#ifndef SETUP
extern BOOL bLanguageSetInSetup;
#endif