[ros-diffs] [cgutman] 40357: - Remove the rest of the code that sets the wrong IRP's status

cgutman at svn.reactos.org cgutman at svn.reactos.org
Sat Apr 4 02:36:44 CEST 2009


Author: cgutman
Date: Sat Apr  4 04:36:43 2009
New Revision: 40357

URL: http://svn.reactos.org/svn/reactos?rev=40357&view=rev
Log:
 - Remove the rest of the code that sets the wrong IRP's status

Modified:
    trunk/reactos/drivers/network/afd/afd/connect.c
    trunk/reactos/drivers/network/afd/afd/listen.c
    trunk/reactos/drivers/network/afd/afd/read.c
    trunk/reactos/drivers/network/afd/afd/write.c

Modified: trunk/reactos/drivers/network/afd/afd/connect.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/connect.c?rev=40357&r1=40356&r2=40357&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] Sat Apr  4 04:36:43 2009
@@ -84,11 +84,8 @@
 
     /* I was wrong about this before as we can have pending writes to a not
      * yet connected socket */
-    if( !SocketAcquireStateLock( FCB ) ) {
-        Irp->IoStatus.Status = STATUS_FILE_CLOSED;
-        Irp->IoStatus.Information = 0;
+    if( !SocketAcquireStateLock( FCB ) )
         return STATUS_FILE_CLOSED;
-    }
 
     AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n",
 			    Irp->IoStatus.Status));
@@ -136,8 +133,6 @@
 	Status = MakeSocketIntoConnection( FCB );
 
 	if( !NT_SUCCESS(Status) ) {
-            Irp->IoStatus.Status = Status;
-            Irp->IoStatus.Information = 0;
 	    SocketStateUnlock( FCB );
 	    return Status;
 	}
@@ -156,12 +151,6 @@
 
 	if( Status == STATUS_PENDING )
 	    Status = STATUS_SUCCESS;
-    }
-
-    if (!NT_SUCCESS(Status))
-    {
-        Irp->IoStatus.Status = Status;
-        Irp->IoStatus.Information = 0;
     }
 
     SocketStateUnlock( FCB );

Modified: trunk/reactos/drivers/network/afd/afd/listen.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/listen.c?rev=40357&r1=40356&r2=40357&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] Sat Apr  4 04:36:43 2009
@@ -98,11 +98,8 @@
     PLIST_ENTRY NextIrpEntry, QeltEntry;
     PIRP NextIrp;
 
-    if( !SocketAcquireStateLock( FCB ) ) {
-        Irp->IoStatus.Status = STATUS_FILE_CLOSED;
-        Irp->IoStatus.Information = 0;
+    if( !SocketAcquireStateLock( FCB ) )
         return STATUS_FILE_CLOSED;
-    }
 
     FCB->ListenIrp.InFlightRequest = NULL;
 

Modified: trunk/reactos/drivers/network/afd/afd/read.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/read.c?rev=40357&r1=40356&r2=40357&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] Sat Apr  4 04:36:43 2009
@@ -260,8 +260,6 @@
 	return STATUS_FILE_CLOSED;
     } else if( FCB->State == SOCKET_STATE_LISTENING ) {
         AFD_DbgPrint(MIN_TRACE,("!!! LISTENER GOT A RECEIVE COMPLETE !!!\n"));
-        Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
-        Irp->IoStatus.Information = 0;
         SocketStateUnlock( FCB );
         return STATUS_INVALID_PARAMETER;
     }
@@ -464,11 +462,8 @@
 
     AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
 
-    if( !SocketAcquireStateLock( FCB ) ) {
-        Irp->IoStatus.Status = STATUS_FILE_CLOSED;
-        Irp->IoStatus.Information = 0;
+    if( !SocketAcquireStateLock( FCB ) )
         return STATUS_FILE_CLOSED;
-    }
 
     FCB->ReceiveIrp.InFlightRequest = NULL;
 
@@ -514,8 +509,6 @@
     } else Status = STATUS_NO_MEMORY;
 
     if( !NT_SUCCESS( Status ) ) {
-        Irp->IoStatus.Status = Status;
-        Irp->IoStatus.Information = 0;
 		if( DatagramRecv ) ExFreePool( DatagramRecv );
 		SocketStateUnlock( FCB );
 		return Status;

Modified: trunk/reactos/drivers/network/afd/afd/write.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/write.c?rev=40357&r1=40356&r2=40357&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] Sat Apr  4 04:36:43 2009
@@ -40,9 +40,8 @@
 
     ASSERT_IRQL(APC_LEVEL);
 
-    if( !SocketAcquireStateLock( FCB ) ) {
+    if( !SocketAcquireStateLock( FCB ) )
         return STATUS_FILE_CLOSED;
-    }
 
     FCB->SendIrp.InFlightRequest = NULL;
     /* Request is not in flight any longer */
@@ -179,9 +178,8 @@
 							Irp->IoStatus.Status,
 							Irp->IoStatus.Information));
 
-    if( !SocketAcquireStateLock( FCB ) ) {
+    if( !SocketAcquireStateLock( FCB ) )
         return STATUS_FILE_CLOSED;
-    }
 
     FCB->SendIrp.InFlightRequest = NULL;
     /* Request is not in flight any longer */



More information about the Ros-diffs mailing list