Author: cgutman
Date: Fri Apr 3 09:31:00 2009
New Revision: 40342
URL:
http://svn.reactos.org/svn/reactos?rev=40342&view=rev
Log:
- RapidSVN doesn't figure out that when I right click afd that I want EVERYTHING
changed in afd to be commited ;)
Modified:
trunk/reactos/drivers/network/afd/afd/listen.c
trunk/reactos/drivers/network/afd/afd/read.c
Modified: trunk/reactos/drivers/network/afd/afd/listen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/li…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] Fri Apr 3 09:31:00 2009
@@ -95,7 +95,7 @@
NTSTATUS Status = STATUS_SUCCESS;
PAFD_FCB FCB = (PAFD_FCB)Context;
PAFD_TDI_OBJECT_QELT Qelt;
- PLIST_ENTRY NextIrpEntry;
+ PLIST_ENTRY NextIrpEntry, QeltEntry;
PIRP NextIrp;
if( !SocketAcquireStateLock( FCB ) ) {
@@ -116,6 +116,27 @@
if( NextIrp->MdlAddress ) UnlockRequest( NextIrp,
IoGetCurrentIrpStackLocation( NextIrp ) );
IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
}
+
+ /* Free all pending connections */
+ while( !IsListEmpty( &FCB->PendingConnections ) ) {
+ QeltEntry = RemoveHeadList(&FCB->PendingConnections);
+ Qelt = CONTAINING_RECORD(QeltEntry, AFD_TDI_OBJECT_QELT, ListEntry);
+ ExFreePool(Qelt);
+ }
+
+ /* Free ConnectionReturnInfo and ConnectionCallInfo */
+ if (FCB->ListenIrp.ConnectionReturnInfo)
+ {
+ ExFreePool(FCB->ListenIrp.ConnectionReturnInfo);
+ FCB->ListenIrp.ConnectionReturnInfo = NULL;
+ }
+
+ if (FCB->ListenIrp.ConnectionCallInfo)
+ {
+ ExFreePool(FCB->ListenIrp.ConnectionCallInfo);
+ FCB->ListenIrp.ConnectionCallInfo = NULL;
+ }
+
SocketStateUnlock( FCB );
return STATUS_FILE_CLOSED;
}
@@ -381,7 +402,7 @@
(PVOID *)&NewFileObject,
NULL );
- if( !NT_SUCCESS(Status) ) UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
+ if( !NT_SUCCESS(Status) ) return UnlockAndMaybeComplete( FCB, Status, Irp, 0
);
ASSERT(NewFileObject != FileObject);
ASSERT(NewFileObject->FsContext != FCB);
Modified: trunk/reactos/drivers/network/afd/afd/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] Fri Apr 3 09:31:00 2009
@@ -460,7 +460,7 @@
PAFD_RECV_INFO RecvReq;
PAFD_STORED_DATAGRAM DatagramRecv;
UINT DGSize = Irp->IoStatus.Information + sizeof( AFD_STORED_DATAGRAM );
- PLIST_ENTRY NextIrpEntry;
+ PLIST_ENTRY NextIrpEntry, DatagramRecvEntry;
AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
@@ -485,6 +485,15 @@
if( NextIrp->MdlAddress ) UnlockRequest( NextIrp,
IoGetCurrentIrpStackLocation( NextIrp ) );
IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
}
+
+ /* Free all items on the datagram list */
+ while( !IsListEmpty( &FCB->DatagramList ) ) {
+ DatagramRecvEntry = RemoveHeadList(&FCB->DatagramList);
+ DatagramRecv = CONTAINING_RECORD(DatagramRecvEntry, AFD_STORED_DATAGRAM,
ListEntry);
+ ExFreePool( DatagramRecv->Address );
+ ExFreePool( DatagramRecv );
+ }
+
SocketStateUnlock( FCB );
return STATUS_FILE_CLOSED;
}