ntdll: Avoid overwriting the result of the async I/O callback in NtFsControlFile.
This commit is contained in:
parent
ad3faa829c
commit
c0fca0a186
|
@ -941,9 +941,7 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
|
||||||
|
|
||||||
if (!event && io->u.Status == STATUS_PENDING)
|
if (!event && io->u.Status == STATUS_PENDING)
|
||||||
{
|
{
|
||||||
do
|
while (NtWaitForSingleObject(internal_event, TRUE, NULL) == STATUS_USER_APC) /*nothing*/ ;
|
||||||
io->u.Status = NtWaitForSingleObject(internal_event, TRUE, NULL);
|
|
||||||
while(io->u.Status == STATUS_USER_APC);
|
|
||||||
}
|
}
|
||||||
if (internal_event) NtClose(internal_event);
|
if (internal_event) NtClose(internal_event);
|
||||||
}
|
}
|
||||||
|
@ -975,9 +973,7 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
|
||||||
|
|
||||||
if (!event && io->u.Status == STATUS_PENDING)
|
if (!event && io->u.Status == STATUS_PENDING)
|
||||||
{
|
{
|
||||||
do
|
while (NtWaitForSingleObject(internal_event, TRUE, NULL) == STATUS_USER_APC) /*nothing*/ ;
|
||||||
io->u.Status = NtWaitForSingleObject(internal_event, TRUE, NULL);
|
|
||||||
while(io->u.Status == STATUS_USER_APC);
|
|
||||||
}
|
}
|
||||||
if (internal_event) NtClose(internal_event);
|
if (internal_event) NtClose(internal_event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue