From f0d01cf5aa301a62b5ddca7292b8313d433b2133 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 12 Aug 2008 03:20:52 +0000 Subject: [PATCH] - Don't forget to call UnlockBuffers() - Use Irp->IoStatus.Information instead of RecvReq->BufferArray[0].len svn path=/branches/aicom-network-fixes/; revision=35283 --- drivers/network/afd/afd/read.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/network/afd/afd/read.c b/drivers/network/afd/afd/read.c index 7e5d5eeb28b..06982c5f84a 100644 --- a/drivers/network/afd/afd/read.c +++ b/drivers/network/afd/afd/read.c @@ -602,8 +602,10 @@ AfdPacketSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PollReeval( FCB->DeviceExt, FCB->FileObject ); + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); + return UnlockAndMaybeComplete - ( FCB, Status, Irp, RecvReq->BufferArray[0].len, NULL ); + ( FCB, Status, Irp, Irp->IoStatus.Information, NULL ); } else { Status = SatisfyPacketRecvRequest ( FCB, Irp, DatagramRecv, @@ -616,6 +618,8 @@ AfdPacketSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PollReeval( FCB->DeviceExt, FCB->FileObject ); + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); + return UnlockAndMaybeComplete ( FCB, Status, Irp, Irp->IoStatus.Information, NULL ); }