]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Add support to tools timeSync to issue w32tm resync in Windows guests.
authorOliver Kurth <okurth@vmware.com>
Mon, 23 Oct 2017 21:21:22 +0000 (14:21 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 23 Oct 2017 21:21:22 +0000 (14:21 -0700)
This change adds support to issue a w32tm resync command from within
VMware tools timeSync in order to reconfigure w32time configuration
parameters. This forces guest time to be resynchronized to external
time server.

open-vm-tools/services/plugins/timeSync/timeSync.c
open-vm-tools/services/plugins/timeSync/timeSync.h
open-vm-tools/services/plugins/timeSync/timeSyncPosix.c

index 060b42003246d142f7ad87da9d7da2ebc6369f0b..04e3d24c708c8a3f0e99b24852144c41415d87a6 100644 (file)
@@ -652,14 +652,14 @@ TimeSyncDoSync(Bool slewCorrection,
              TimeSync_IsGuestSyncServiceRunning()) {
             if (data->guestResyncTimer == NULL) {
                g_debug("Guest resync: stepping time.\n");
-               if (!TimeSync_DoGuestResync()) {
+               ASSERT(data->ctx != NULL);
+               if (!TimeSync_DoGuestResync(data->ctx)) {
                   g_warning("Guest resync operation failed.\n");
                   return TimeSyncDoSync(data->slewCorrection,
                                         TIMESYNC_STEP_NORESYNC,
                                         allowBackwardSync, data);
                }
                if (data->guestResyncTimeout > 0) {
-                  ASSERT(data->ctx != NULL);
                   data->guestResyncTimer =
                      g_timeout_source_new(data->guestResyncTimeout);
                   VMTOOLSAPP_ATTACH_SOURCE(data->ctx, data->guestResyncTimer,
index 4ae665aa6b84fde90ba31a3837eea0cdf85076c8..fc87c32c6d8db2ea5d70f80c68e838ed6bafbde0 100644 (file)
@@ -57,7 +57,7 @@ Bool
 TimeSync_IsGuestSyncServiceRunning(void);
 
 Bool
-TimeSync_DoGuestResync(void);
+TimeSync_DoGuestResync(void *_ctx);
 
 #endif /* _TIMESYNC_INT_H_ */
 
index 56bd2a704b173b6a914b6ded70c27e534655e2fe..8766a569de6c1c212a5b3d796914954349aa4201 100644 (file)
@@ -147,7 +147,7 @@ TimeSync_IsGuestSyncServiceRunning(void)
  */
 
 Bool
-TimeSync_DoGuestResync(void)
+TimeSync_DoGuestResync(void *_ctx)
 {
    // Not Implemented.
    return FALSE;