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

dll/win32/kernel32_vista/sync.c

index 57fc81a..d8be19c 100644 (file)
@@ -124,7 +124,7 @@ SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK Lock,
     LARGE_INTEGER Time;
 
     Status = RtlSleepConditionVariableSRW(ConditionVariable, Lock, GetNtTimeout(&Time, Timeout), Flags);
-    if (!NT_SUCCESS(Status))
+    if (!NT_SUCCESS(Status) || Status == STATUS_TIMEOUT)
     {
         SetLastError(RtlNtStatusToDosError(Status));
         return FALSE;