[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:
Johannes Anderwald 2011-03-16 15:18:52 +00:00
parent 3f20ae61b8
commit 0416030d2a

View file

@ -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(