Don't try to acquire the mutex, if the mutex already exist (reported by
Joseph Galbraith).
Modified: trunk/reactos/lib/kernel32/synch/mutex.c
_____
Modified: trunk/reactos/lib/kernel32/synch/mutex.c
--- trunk/reactos/lib/kernel32/synch/mutex.c 2005-08-06 15:01:08 UTC
(rev 17099)
+++ trunk/reactos/lib/kernel32/synch/mutex.c 2005-08-06 15:55:59 UTC
(rev 17100)
@@ -99,13 +99,13 @@
&ObjectAttributes);
if (NT_SUCCESS(Status))
{
- if(bInitialOwner)
- {
- WaitForSingleObject(MutantHandle, INFINITE);
- }
SetLastError(ERROR_ALREADY_EXISTS);
}
}
+ else if (NT_SUCCESS(Status))
+ {
+ SetLastError(ERROR_SUCCESS);
+ }
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
Show replies by date