Fixed some problems with asynchronous file IO.
This commit is contained in:
parent
4941a3aff2
commit
60cba9999c
|
@ -152,7 +152,7 @@ static void CALLBACK fileio_call_completion_func (ULONG_PTR data)
|
||||||
async_fileio *ovp = (async_fileio*) data;
|
async_fileio *ovp = (async_fileio*) data;
|
||||||
TRACE ("data: %p\n", ovp);
|
TRACE ("data: %p\n", ovp);
|
||||||
|
|
||||||
ovp->completion_func( ovp->lpOverlapped->Internal,
|
ovp->completion_func( RtlNtStatusToDosError ( ovp->lpOverlapped->Internal ),
|
||||||
ovp->lpOverlapped->InternalHigh,
|
ovp->lpOverlapped->InternalHigh,
|
||||||
ovp->lpOverlapped );
|
ovp->lpOverlapped );
|
||||||
|
|
||||||
|
@ -1697,6 +1697,11 @@ static void FILE_AsyncReadService(async_private *ovp)
|
||||||
r = FILE_GetNtStatus ();
|
r = FILE_GetNtStatus ();
|
||||||
goto async_end;
|
goto async_end;
|
||||||
}
|
}
|
||||||
|
else if ( result == 0 )
|
||||||
|
{
|
||||||
|
r = ( lpOverlapped->InternalHigh ? STATUS_SUCCESS : STATUS_END_OF_FILE );
|
||||||
|
goto async_end;
|
||||||
|
}
|
||||||
|
|
||||||
lpOverlapped->InternalHigh += result;
|
lpOverlapped->InternalHigh += result;
|
||||||
TRACE("read %d more bytes %ld/%d so far\n",result,lpOverlapped->InternalHigh,fileio->count);
|
TRACE("read %d more bytes %ld/%d so far\n",result,lpOverlapped->InternalHigh,fileio->count);
|
||||||
|
|
Loading…
Reference in New Issue