]> xenbits.xensource.com Git - people/pauldu/xenbus.git/commitdiff
XENBUS_MONITOR: don't delete the registry value until a reboot is pending
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 28 Jul 2016 09:34:13 +0000 (10:34 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 28 Jul 2016 09:48:21 +0000 (10:48 +0100)
If a reboot is requested whilst there is no active session then the
monitor will not be able to prompt for reboot. We need to leave the
registry value in place until we have prompted.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/monitor/monitor.c

index 9a4f4f90099418a4c8bc17fb7f8b471363755516..739aaffd160599f91338d78a91fd71764dc13836 100644 (file)
@@ -558,7 +558,8 @@ CheckRebootValue(
     if (!Context->RebootPending)
         PromptForReboot(Reboot);
 
-    (VOID) RegDeleteValue(Context->RequestKey, "Reboot");
+    if (Context->RebootPending)
+        (VOID) RegDeleteValue(Context->RequestKey, "Reboot");
 
 done:
     free(Reboot);