mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
- Merge r38358, r38539, and r38541
svn path=/trunk/; revision=38542
This commit is contained in:
parent
b470703879
commit
831afe52e7
3 changed files with 18 additions and 19 deletions
|
@ -159,8 +159,16 @@ static NTSTATUS NTAPI ListenComplete
|
||||||
ListEntry ) );
|
ListEntry ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( FCB->ListenIrp.ConnectionCallInfo ) ExFreePool( FCB->ListenIrp.ConnectionCallInfo );
|
if( FCB->ListenIrp.ConnectionCallInfo ) {
|
||||||
if( FCB->ListenIrp.ConnectionReturnInfo ) ExFreePool( FCB->ListenIrp.ConnectionReturnInfo );
|
ExFreePool( FCB->ListenIrp.ConnectionCallInfo );
|
||||||
|
FCB->ListenIrp.ConnectionCallInfo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( FCB->ListenIrp.ConnectionReturnInfo ) {
|
||||||
|
ExFreePool( FCB->ListenIrp.ConnectionReturnInfo );
|
||||||
|
FCB->ListenIrp.ConnectionReturnInfo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
FCB->NeedsNewListen = TRUE;
|
FCB->NeedsNewListen = TRUE;
|
||||||
|
|
||||||
/* Trigger a select return if appropriate */
|
/* Trigger a select return if appropriate */
|
||||||
|
|
|
@ -420,21 +420,13 @@ NTSTATUS TdiListen
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = TdiBuildNullConnectionInfo(RequestConnectionInfo,
|
|
||||||
TDI_ADDRESS_TYPE_IP);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
return Status;
|
|
||||||
|
|
||||||
*Irp = TdiBuildInternalDeviceControlIrp(TDI_LISTEN, /* Sub function */
|
*Irp = TdiBuildInternalDeviceControlIrp(TDI_LISTEN, /* Sub function */
|
||||||
DeviceObject, /* Device object */
|
DeviceObject, /* Device object */
|
||||||
ConnectionObject, /* File object */
|
ConnectionObject, /* File object */
|
||||||
NULL, /* Event */
|
NULL, /* Event */
|
||||||
Iosb); /* Status */
|
Iosb); /* Status */
|
||||||
if (*Irp == NULL)
|
if (*Irp == NULL)
|
||||||
{
|
|
||||||
ExFreePool(*RequestConnectionInfo);
|
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
|
||||||
|
|
||||||
TdiBuildListen(*Irp, /* IRP */
|
TdiBuildListen(*Irp, /* IRP */
|
||||||
DeviceObject, /* Device object */
|
DeviceObject, /* Device object */
|
||||||
|
|
|
@ -250,8 +250,7 @@ PIP_PACKET ReassembleDatagram(
|
||||||
__inline VOID Cleanup(
|
__inline VOID Cleanup(
|
||||||
PKSPIN_LOCK Lock,
|
PKSPIN_LOCK Lock,
|
||||||
KIRQL OldIrql,
|
KIRQL OldIrql,
|
||||||
PIPDATAGRAM_REASSEMBLY IPDR,
|
PIPDATAGRAM_REASSEMBLY IPDR)
|
||||||
PVOID Buffer OPTIONAL)
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Performs cleaning operations on errors
|
* FUNCTION: Performs cleaning operations on errors
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -266,8 +265,6 @@ __inline VOID Cleanup(
|
||||||
TcpipReleaseSpinLock(Lock, OldIrql);
|
TcpipReleaseSpinLock(Lock, OldIrql);
|
||||||
RemoveIPDR(IPDR);
|
RemoveIPDR(IPDR);
|
||||||
FreeIPDR(IPDR);
|
FreeIPDR(IPDR);
|
||||||
if (Buffer)
|
|
||||||
exFreePool(Buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -375,7 +372,8 @@ VOID ProcessFragment(
|
||||||
NewHole = CreateHoleDescriptor(Hole->First, FragLast - 1);
|
NewHole = CreateHoleDescriptor(Hole->First, FragLast - 1);
|
||||||
if (!NewHole) {
|
if (!NewHole) {
|
||||||
/* We don't have the resources to process this packet, discard it */
|
/* We don't have the resources to process this packet, discard it */
|
||||||
Cleanup(&IPDR->Lock, OldIrql, IPDR, Hole);
|
exFreeToNPagedLookasideList(&IPHoleList, Hole);
|
||||||
|
Cleanup(&IPDR->Lock, OldIrql, IPDR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,9 +383,9 @@ VOID ProcessFragment(
|
||||||
|
|
||||||
if ((FragLast < Hole->Last) && (MoreFragments)) {
|
if ((FragLast < Hole->Last) && (MoreFragments)) {
|
||||||
/* We can reuse the descriptor for the new hole */
|
/* We can reuse the descriptor for the new hole */
|
||||||
Hole->First = FragLast + 1;
|
Hole->First = FragLast + 1;
|
||||||
|
|
||||||
/* Put the new hole descriptor in the list */
|
/* Put the new hole descriptor in the list */
|
||||||
InsertTailList(&IPDR->HoleListHead, &Hole->ListEntry);
|
InsertTailList(&IPDR->HoleListHead, &Hole->ListEntry);
|
||||||
} else
|
} else
|
||||||
TcpipFreeToNPagedLookasideList(&IPHoleList, Hole);
|
TcpipFreeToNPagedLookasideList(&IPHoleList, Hole);
|
||||||
|
@ -407,7 +405,7 @@ VOID ProcessFragment(
|
||||||
Fragment = TcpipAllocateFromNPagedLookasideList(&IPFragmentList);
|
Fragment = TcpipAllocateFromNPagedLookasideList(&IPFragmentList);
|
||||||
if (!Fragment) {
|
if (!Fragment) {
|
||||||
/* We don't have the resources to process this packet, discard it */
|
/* We don't have the resources to process this packet, discard it */
|
||||||
Cleanup(&IPDR->Lock, OldIrql, IPDR, NULL);
|
Cleanup(&IPDR->Lock, OldIrql, IPDR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +415,8 @@ VOID ProcessFragment(
|
||||||
Fragment->Data = exAllocatePool(NonPagedPool, Fragment->Size);
|
Fragment->Data = exAllocatePool(NonPagedPool, Fragment->Size);
|
||||||
if (!Fragment->Data) {
|
if (!Fragment->Data) {
|
||||||
/* We don't have the resources to process this packet, discard it */
|
/* We don't have the resources to process this packet, discard it */
|
||||||
Cleanup(&IPDR->Lock, OldIrql, IPDR, Fragment);
|
exFreeToNPagedLookasideList(&IPFragmentList, Fragment);
|
||||||
|
Cleanup(&IPDR->Lock, OldIrql, IPDR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue