[KERNEL32_VISTA] Make SleepConditionVariableCS fail when it times out
authorPierre Schweitzer <pierre@reactos.org>
Sun, 16 Sep 2018 12:42:43 +0000 (14:42 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 16 Sep 2018 12:42:43 +0000 (14:42 +0200)
This fixes a few newly added winetests.

dll/win32/kernel32_vista/sync.c

index 1f13206..57fc81a 100644 (file)
@@ -108,7 +108,7 @@ SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTIO
     LARGE_INTEGER Time;
 
     Status = RtlSleepConditionVariableCS(ConditionVariable, (PRTL_CRITICAL_SECTION)CriticalSection, GetNtTimeout(&Time, Timeout));
-    if (!NT_SUCCESS(Status))
+    if (!NT_SUCCESS(Status) || Status == STATUS_TIMEOUT)
     {
         SetLastError(RtlNtStatusToDosError(Status));
         return FALSE;