VirtualBox

Ignore:
Timestamp:
Dec 7, 2017 4:38:41 PM (7 years ago)
Author:
vboxsync
Message:

VBoxServiceTimeSync.cpp: Fixed /VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore reading to use 0 instead of 1 as the minimum value, since with a maximum of 1 there was no way of disabling this...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp

    r69987 r69990  
    219219            || rc == VERR_NOT_FOUND)
    220220        {
    221             uint32_t value;
     221            uint32_t uValue;
    222222            rc = VGSvcReadPropUInt32(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore",
    223                                      &value, 1, 1);
     223                                     &uValue, 0 /*uMin*/, 1 /*uMax*/);
    224224            if (RT_SUCCESS(rc))
    225                 g_fTimeSyncSetOnRestore = !!value;
     225                g_fTimeSyncSetOnRestore = uValue != 0;
    226226        }
    227227        if (   RT_SUCCESS(rc)
    228228            || rc == VERR_NOT_FOUND)
    229229        {
    230             uint32_t value;
     230            uint32_t uValue;
    231231            rc = VGSvcReadPropUInt32(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/VBoxService/--timesync-verbosity",
    232                                      &value, 0, 255);
     232                                     &uValue, 0 /*uMin*/, 255 /*uMax*/);
    233233            if (RT_SUCCESS(rc))
    234                 g_uTimeSyncVerbosity = (unsigned)value;
     234                g_uTimeSyncVerbosity = (unsigned)uValue;
    235235        }
    236236        VbglR3GuestPropDisconnect(uGuestPropSvcClientID);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette