- Clear the sendable flag after a disconnect
- Don't set the sendable flag if send has been closed

svn path=/trunk/; revision=53009
This commit is contained in:
Cameron Gutman 2011-07-31 19:51:32 +00:00
parent 623f93a9e3
commit e30f10e6b0
2 changed files with 5 additions and 1 deletions

View file

@ -720,6 +720,7 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
FCB->DisconnectTimeout = DisReq->Timeout;
FCB->DisconnectPending = TRUE;
FCB->SendClosed = TRUE;
FCB->PollState &= ~AFD_EVENT_SEND;
Status = QueueUserModeIrp(FCB, Irp, FUNCTION_DISCONNECT);
if (Status == STATUS_PENDING)
@ -755,6 +756,8 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
ExFreePool(FCB->RemoteAddress);
FCB->RemoteAddress = NULL;
FCB->PollState &= ~AFD_EVENT_SEND;
}
}

View file

@ -176,7 +176,8 @@ static NTSTATUS NTAPI SendComplete
break;
}
if (FCB->Send.Size - FCB->Send.BytesUsed != 0)
if (FCB->Send.Size - FCB->Send.BytesUsed != 0 &&
!FCB->SendClosed)
{
FCB->PollState |= AFD_EVENT_SEND;
FCB->PollStatus[FD_WRITE_BIT] = STATUS_SUCCESS;