Author: cgutman
Date: Sun Jul 31 19:51:32 2011
New Revision: 53009
URL:
http://svn.reactos.org/svn/reactos?rev=53009&view=rev
Log:
[AFD]
- Clear the sendable flag after a disconnect
- Don't set the sendable flag if send has been closed
Modified:
trunk/reactos/drivers/network/afd/afd/main.c
trunk/reactos/drivers/network/afd/afd/write.c
Modified: trunk/reactos/drivers/network/afd/afd/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Sun Jul 31 19:51:32 2011
@@ -720,6 +720,7 @@
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 @@
ExFreePool(FCB->RemoteAddress);
FCB->RemoteAddress = NULL;
+
+ FCB->PollState &= ~AFD_EVENT_SEND;
}
}
Modified: trunk/reactos/drivers/network/afd/afd/write.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/wr…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] Sun Jul 31 19:51:32 2011
@@ -176,7 +176,8 @@
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;