Author: cgutman
Date: Fri Apr 10 06:38:45 2009
New Revision: 40436
URL:
http://svn.reactos.org/svn/reactos?rev=40436&view=rev
Log:
- Complete send requests along with the other types when we get an EOF
- Fail the requests with STATUS_CANCELLED
Modified:
trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
==============================================================================
--- trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Fri Apr 10 06:38:45
2009
@@ -218,27 +218,22 @@
if( NewState & SEL_FIN ) {
PLIST_ENTRY ListsToErase[4];
- NTSTATUS IrpStatus[4];
UINT i;
TI_DbgPrint(DEBUG_TCP, ("EOF From socket\n"));
ListsToErase[0] = &Connection->ReceiveRequest;
- IrpStatus [0] = STATUS_SUCCESS;
ListsToErase[1] = &Connection->ListenRequest;
- IrpStatus [1] = STATUS_UNSUCCESSFUL;
ListsToErase[2] = &Connection->ConnectRequest;
- IrpStatus [2] = STATUS_UNSUCCESSFUL;
- ListsToErase[3] = 0;
- IrpStatus [3] = 0;
-
- for( i = 0; ListsToErase[i]; i++ ) {
+ ListsToErase[3] = &Connection->SendRequest;
+
+ for( i = 0; i < 4; i++ ) {
while( !IsListEmpty( ListsToErase[i] ) ) {
Entry = RemoveHeadList( ListsToErase[i] );
Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry );
Complete = Bucket->Request.RequestNotifyObject;
- Complete( Bucket->Request.RequestContext, IrpStatus[i], 0 );
- exFreePool( Bucket );
+ Complete( Bucket->Request.RequestContext, STATUS_CANCELLED, 0 );
+ exFreePool( Bucket );
}
}
}