Author: cgutman Date: Sun Aug 9 05:57:29 2009 New Revision: 42542
URL: http://svn.reactos.org/svn/reactos?rev=42542&view=rev Log: - Return the correct value for AFD_INFO_BLOCKING_MODE - Implement AFD_INFO_SENDS_IN_PROGRESS (SO_LINGER should work now)
Modified: trunk/reactos/drivers/network/afd/afd/info.c
Modified: trunk/reactos/drivers/network/afd/afd/info.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/inf... ============================================================================== --- trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] Sun Aug 9 05:57:29 2009 @@ -20,6 +20,7 @@ PAFD_INFO InfoReq = IrpSp->Parameters.DeviceIoControl.Type3InputBuffer; PFILE_OBJECT FileObject = IrpSp->FileObject; PAFD_FCB FCB = FileObject->FsContext; + PLIST_ENTRY CurrentEntry;
AFD_DbgPrint(MID_TRACE,("Called %x %x\n", InfoReq, InfoReq ? InfoReq->InformationClass : 0)); @@ -42,7 +43,7 @@ break;
case AFD_INFO_BLOCKING_MODE: - InfoReq->Information.Ulong = 0; + InfoReq->Information.Ulong = FCB->BlockingMode; break;
case AFD_INFO_RECEIVE_CONTENT_SIZE: @@ -52,6 +53,23 @@ InfoReq->Information.Ulong = FCB->Recv.Content - FCB->Recv.BytesUsed;
break; + + case AFD_INFO_SENDS_IN_PROGRESS: + InfoReq->Information.Ulong = 0; + + /* Count the queued sends */ + CurrentEntry = FCB->PendingIrpList[FUNCTION_SEND].Flink; + while (CurrentEntry != &FCB->PendingIrpList[FUNCTION_SEND]) + { + InfoReq->Information.Ulong++; + CurrentEntry = CurrentEntry->Flink; + } + + /* Count the send in progress */ + if (FCB->SendIrp.InFlightRequest) + InfoReq->Information.Ulong++; + + break;
default: AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n",