mirror of
https://github.com/reactos/reactos.git
synced 2024-08-12 06:06:27 +00:00
- RapidSVN doesn't figure out that when I right click afd that I want EVERYTHING changed in afd to be commited ;)
svn path=/trunk/; revision=40342
This commit is contained in:
parent
97332db7ed
commit
258f1161f3
|
@ -95,7 +95,7 @@ static NTSTATUS NTAPI ListenComplete
|
|||
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 @@ static NTSTATUS NTAPI ListenComplete
|
|||
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 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
(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);
|
||||
|
|
|
@ -460,7 +460,7 @@ PacketSocketRecvComplete(
|
|||
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 @@ PacketSocketRecvComplete(
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue