Author: janderwald
Date: Wed Mar 16 15:18:52 2011
New Revision: 51067
URL:
http://svn.reactos.org/svn/reactos?rev=51067&view=rev
Log:
[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 ;)
Modified:
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] Wed Mar 16
15:18:52 2011
@@ -402,28 +402,6 @@
/* 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 @@
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;
@@ -470,7 +443,6 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
NTAPI