Author: cgutman
Date: Mon Aug 3 09:07:21 2009
New Revision: 42360
URL:
http://svn.reactos.org/svn/reactos?rev=42360&view=rev
Log:
- Revert r42358 due to what seems to be issues handling cleanup IRPs
Modified:
trunk/reactos/drivers/network/afd/afd/bind.c
trunk/reactos/drivers/network/afd/afd/connect.c
trunk/reactos/drivers/network/afd/afd/main.c
trunk/reactos/drivers/network/afd/afd/tdi.c
Modified: trunk/reactos/drivers/network/afd/afd/bind.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] Mon Aug 3 09:07:21 2009
@@ -32,6 +32,11 @@
FCB->LocalAddress,
&FCB->AddressFile.Handle,
&FCB->AddressFile.Object );
+
+ if (NT_SUCCESS(Status))
+ {
+ ObReferenceObject(FCB->AddressFile.Object);
+ }
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
Modified: trunk/reactos/drivers/network/afd/afd/connect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] Mon Aug 3 09:07:21 2009
@@ -29,6 +29,11 @@
FCB->Connection.Object );
}
+ if (NT_SUCCESS(Status))
+ {
+ ObReferenceObject(FCB->Connection.Object);
+ }
+
return Status;
}
Modified: trunk/reactos/drivers/network/afd/afd/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Mon Aug 3 09:07:21 2009
@@ -96,8 +96,6 @@
FCB->DeviceExt = DeviceExt;
FCB->Recv.Size = DEFAULT_RECEIVE_WINDOW_SIZE;
FCB->Send.Size = DEFAULT_SEND_WINDOW_SIZE;
- FCB->AddressFile.Handle = INVALID_HANDLE_VALUE;
- FCB->Connection.Handle = INVALID_HANDLE_VALUE;
KeInitializeSpinLock( &FCB->SpinLock );
ExInitializeFastMutex( &FCB->Mutex );
@@ -224,20 +222,14 @@
FCB->RemoteAddress = NULL;
}
if( FCB->Connection.Object ) {
+ ZwClose(FCB->Connection.Handle);
ObDereferenceObject(FCB->Connection.Object);
FCB->Connection.Object = NULL;
}
if( FCB->AddressFile.Object ) {
+ ZwClose(FCB->AddressFile.Handle);
ObDereferenceObject(FCB->AddressFile.Object);
FCB->AddressFile.Object = NULL;
- }
- if( FCB->AddressFile.Handle != INVALID_HANDLE_VALUE ) {
- ZwClose(FCB->AddressFile.Handle);
- FCB->AddressFile.Handle = INVALID_HANDLE_VALUE;
- }
- if( FCB->Connection.Handle != INVALID_HANDLE_VALUE ) {
- ZwClose(FCB->Connection.Handle);
- FCB->Connection.Handle = INVALID_HANDLE_VALUE;
}
SocketStateUnlock( FCB );
Modified: trunk/reactos/drivers/network/afd/afd/tdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Mon Aug 3 09:07:21 2009
@@ -146,12 +146,13 @@
}
if (!NT_SUCCESS(Status)) {
- *Handle = INVALID_HANDLE_VALUE;
+ *Handle = NULL;
*Object = NULL;
}
return Status;
}
+
NTSTATUS TdiOpenAddressFile(
PUNICODE_STRING DeviceName,