Fix a copy-paste mistake and remove an unused variable
authorCameron Gutman <aicommander@gmail.com>
Sun, 1 Aug 2010 21:08:53 +0000 (21:08 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sun, 1 Aug 2010 21:08:53 +0000 (21:08 +0000)
svn path=/trunk/; revision=48401

reactos/drivers/network/afd/afd/read.c

index 8dd7792..447f09f 100644 (file)
@@ -84,7 +84,6 @@ static NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB,
                BytesAvailable =
                FCB->Recv.Content - FCB->Recv.BytesUsed;
     PAFD_MAPBUF Map;
                BytesAvailable =
                FCB->Recv.Content - FCB->Recv.BytesUsed;
     PAFD_MAPBUF Map;
-    NTSTATUS Status;
     *TotalBytesCopied = 0;
 
 
     *TotalBytesCopied = 0;
 
 
@@ -178,6 +177,7 @@ static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
             NextIrp->IoStatus.Information = 0;
             if( NextIrp == Irp ) RetStatus = Status;
             if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
             NextIrp->IoStatus.Information = 0;
             if( NextIrp == Irp ) RetStatus = Status;
             if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
+                       (void)IoSetCancelRoutine(NextIrp, NULL);
             IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
             FCB->Overread = TRUE;
         }
             IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
             FCB->Overread = TRUE;
         }
@@ -220,6 +220,7 @@ static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
                                        RetBytesCopied = TotalBytesCopied;
                                }
                                if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
                                        RetBytesCopied = TotalBytesCopied;
                                }
                                if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
+                               (void)IoSetCancelRoutine(NextIrp, NULL);
                                IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
                        }
                }
                                IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
                        }
                }