mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[AFD]
- Cancel the in-flight disconnect IRP during socket closure [TCPIP] - Make a disconnect IRP cancelable svn path=/trunk/; revision=53016
This commit is contained in:
parent
a90824eeae
commit
f34cad36e2
3 changed files with 17 additions and 9 deletions
|
@ -436,6 +436,7 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
InFlightRequest[1] = &FCB->ReceiveIrp;
|
||||
InFlightRequest[2] = &FCB->SendIrp;
|
||||
InFlightRequest[3] = &FCB->ConnectIrp;
|
||||
InFlightRequest[4] = &FCB->DisconnectIrp;
|
||||
|
||||
/* Cancel our pending requests */
|
||||
for( i = 0; i < IN_FLIGHT_REQUESTS; i++ ) {
|
||||
|
|
|
@ -108,7 +108,7 @@ typedef struct IPADDR_ENTRY {
|
|||
#define FUNCTION_CLOSE 6
|
||||
#define MAX_FUNCTIONS 7
|
||||
|
||||
#define IN_FLIGHT_REQUESTS 4
|
||||
#define IN_FLIGHT_REQUESTS 5
|
||||
|
||||
#define EXTRA_LOCK_BUFFERS 2 /* Number of extra buffers needed
|
||||
* for ancillary data on packet
|
||||
|
|
|
@ -543,15 +543,22 @@ NTSTATUS DispTdiDisconnect(
|
|||
Status = STATUS_INVALID_PARAMETER;
|
||||
goto done;
|
||||
}
|
||||
|
||||
Status = DispPrepareIrpForCancel
|
||||
(TranContext->Handle.ConnectionContext,
|
||||
Irp,
|
||||
(PDRIVER_CANCEL)DispCancelRequest);
|
||||
|
||||
Status = TCPDisconnect(
|
||||
TranContext->Handle.ConnectionContext,
|
||||
DisReq->RequestFlags,
|
||||
DisReq->RequestSpecific,
|
||||
DisReq->RequestConnectionInformation,
|
||||
DisReq->ReturnConnectionInformation,
|
||||
DispDataRequestComplete,
|
||||
Irp );
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Status = TCPDisconnect(TranContext->Handle.ConnectionContext,
|
||||
DisReq->RequestFlags,
|
||||
DisReq->RequestSpecific,
|
||||
DisReq->RequestConnectionInformation,
|
||||
DisReq->ReturnConnectionInformation,
|
||||
DispDataRequestComplete,
|
||||
Irp);
|
||||
}
|
||||
|
||||
done:
|
||||
if (Status != STATUS_PENDING) {
|
||||
|
|
Loading…
Reference in a new issue