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[1] = &FCB->ReceiveIrp;
|
||||||
InFlightRequest[2] = &FCB->SendIrp;
|
InFlightRequest[2] = &FCB->SendIrp;
|
||||||
InFlightRequest[3] = &FCB->ConnectIrp;
|
InFlightRequest[3] = &FCB->ConnectIrp;
|
||||||
|
InFlightRequest[4] = &FCB->DisconnectIrp;
|
||||||
|
|
||||||
/* Cancel our pending requests */
|
/* Cancel our pending requests */
|
||||||
for( i = 0; i < IN_FLIGHT_REQUESTS; i++ ) {
|
for( i = 0; i < IN_FLIGHT_REQUESTS; i++ ) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ typedef struct IPADDR_ENTRY {
|
||||||
#define FUNCTION_CLOSE 6
|
#define FUNCTION_CLOSE 6
|
||||||
#define MAX_FUNCTIONS 7
|
#define MAX_FUNCTIONS 7
|
||||||
|
|
||||||
#define IN_FLIGHT_REQUESTS 4
|
#define IN_FLIGHT_REQUESTS 5
|
||||||
|
|
||||||
#define EXTRA_LOCK_BUFFERS 2 /* Number of extra buffers needed
|
#define EXTRA_LOCK_BUFFERS 2 /* Number of extra buffers needed
|
||||||
* for ancillary data on packet
|
* for ancillary data on packet
|
||||||
|
|
|
@ -543,15 +543,22 @@ NTSTATUS DispTdiDisconnect(
|
||||||
Status = STATUS_INVALID_PARAMETER;
|
Status = STATUS_INVALID_PARAMETER;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status = DispPrepareIrpForCancel
|
||||||
|
(TranContext->Handle.ConnectionContext,
|
||||||
|
Irp,
|
||||||
|
(PDRIVER_CANCEL)DispCancelRequest);
|
||||||
|
|
||||||
Status = TCPDisconnect(
|
if (NT_SUCCESS(Status))
|
||||||
TranContext->Handle.ConnectionContext,
|
{
|
||||||
DisReq->RequestFlags,
|
Status = TCPDisconnect(TranContext->Handle.ConnectionContext,
|
||||||
DisReq->RequestSpecific,
|
DisReq->RequestFlags,
|
||||||
DisReq->RequestConnectionInformation,
|
DisReq->RequestSpecific,
|
||||||
DisReq->ReturnConnectionInformation,
|
DisReq->RequestConnectionInformation,
|
||||||
DispDataRequestComplete,
|
DisReq->ReturnConnectionInformation,
|
||||||
Irp );
|
DispDataRequestComplete,
|
||||||
|
Irp);
|
||||||
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (Status != STATUS_PENDING) {
|
if (Status != STATUS_PENDING) {
|
||||||
|
|
Loading…
Reference in a new issue