mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[WDMAUD_KERNEL]
- Don't alter the IoStatus.Information field with the number of bytes written - Fixes sndrec32 crash (now also working in ReactOS) - Should be merged to 0.3.13 ;) svn path=/trunk/; revision=51067
This commit is contained in:
parent
3f20ae61b8
commit
0416030d2a
1 changed files with 1 additions and 29 deletions
|
@ -402,28 +402,6 @@ IoCompletion (
|
|||
/* sanity check */
|
||||
ASSERT(Header);
|
||||
|
||||
/* iterate through all stream headers and collect size */
|
||||
do
|
||||
{
|
||||
if (Context->Function == IOCTL_KS_READ_STREAM)
|
||||
{
|
||||
/* length is stored in DataUsed */
|
||||
Length += Header->DataUsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* length stored in frameextend */
|
||||
Length += Header->FrameExtent;
|
||||
}
|
||||
|
||||
/* subtract size */
|
||||
Context->Length -= Header->Size;
|
||||
|
||||
/* move to next stream header */
|
||||
Header = (PKSSTREAM_HEADER)((ULONG_PTR)Header + Header->Size);
|
||||
|
||||
}while(Context->Length);
|
||||
|
||||
/* time to free all allocated mdls */
|
||||
Mdl = Irp->MdlAddress;
|
||||
|
||||
|
@ -454,12 +432,7 @@ IoCompletion (
|
|||
|
||||
DPRINT("IoCompletion Irp %p IoStatus %lx Information %lx Length %lu\n", Irp, Irp->IoStatus.Status, Irp->IoStatus.Information, Length);
|
||||
|
||||
if (Irp->IoStatus.Status == STATUS_SUCCESS)
|
||||
{
|
||||
/* store the length */
|
||||
Irp->IoStatus.Information = Length;
|
||||
}
|
||||
else
|
||||
if (!NT_SUCCESS(Irp->IoStatus.Status))
|
||||
{
|
||||
/* failed */
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -471,7 +444,6 @@ IoCompletion (
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
WdmAudReadWrite(
|
||||
|
|
Loading…
Reference in a new issue