mirror of
https://github.com/reactos/reactos.git
synced 2024-09-15 07:05:04 +00:00
- We must assign values to Irp->IoStatus.Status and Irp->IoStatus.Information because the function that called us might not call UnlockAndMaybeComplete to assign those values
svn path=/branches/aicom-network-fixes/; revision=35053
This commit is contained in:
parent
f470e856b1
commit
312bb6657e
|
@ -129,7 +129,7 @@ static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
|
|||
PIRP NextIrp;
|
||||
PIO_STACK_LOCATION NextIrpSp;
|
||||
PAFD_RECV_INFO RecvReq;
|
||||
UINT TotalBytesCopied = 0;
|
||||
UINT TotalBytesCopied = 0, RetBytesCopied = 0;
|
||||
NTSTATUS Status = STATUS_SUCCESS, RetStatus = STATUS_PENDING;
|
||||
|
||||
AFD_DbgPrint(MID_TRACE,("%x %x\n", FCB, Irp));
|
||||
|
@ -197,7 +197,10 @@ static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
|
|||
RecvReq->BufferCount, FALSE );
|
||||
NextIrp->IoStatus.Status = Status;
|
||||
NextIrp->IoStatus.Information = TotalBytesCopied;
|
||||
if( NextIrp == Irp ) RetStatus = Status;
|
||||
if( NextIrp == Irp ) {
|
||||
RetStatus = Status;
|
||||
RetBytesCopied = TotalBytesCopied;
|
||||
}
|
||||
if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
|
||||
IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
|
||||
}
|
||||
|
@ -213,6 +216,12 @@ static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
|
|||
|
||||
AFD_DbgPrint(MID_TRACE,("RetStatus for irp %x is %x\n", Irp, RetStatus));
|
||||
|
||||
/* Sometimes we're called with a NULL Irp */
|
||||
if( Irp ) {
|
||||
Irp->IoStatus.Status = RetStatus;
|
||||
Irp->IoStatus.Information = RetBytesCopied;
|
||||
}
|
||||
|
||||
return RetStatus;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue