mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:53:40 +00:00
- Return the correct value for AFD_INFO_BLOCKING_MODE
- Implement AFD_INFO_SENDS_IN_PROGRESS (SO_LINGER should work now) svn path=/trunk/; revision=42542
This commit is contained in:
parent
7c7fefd8d3
commit
bfe9c97ce3
1 changed files with 19 additions and 1 deletions
|
@ -20,6 +20,7 @@ AfdGetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
PAFD_INFO InfoReq = IrpSp->Parameters.DeviceIoControl.Type3InputBuffer;
|
PAFD_INFO InfoReq = IrpSp->Parameters.DeviceIoControl.Type3InputBuffer;
|
||||||
PFILE_OBJECT FileObject = IrpSp->FileObject;
|
PFILE_OBJECT FileObject = IrpSp->FileObject;
|
||||||
PAFD_FCB FCB = FileObject->FsContext;
|
PAFD_FCB FCB = FileObject->FsContext;
|
||||||
|
PLIST_ENTRY CurrentEntry;
|
||||||
|
|
||||||
AFD_DbgPrint(MID_TRACE,("Called %x %x\n", InfoReq,
|
AFD_DbgPrint(MID_TRACE,("Called %x %x\n", InfoReq,
|
||||||
InfoReq ? InfoReq->InformationClass : 0));
|
InfoReq ? InfoReq->InformationClass : 0));
|
||||||
|
@ -42,7 +43,7 @@ AfdGetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AFD_INFO_BLOCKING_MODE:
|
case AFD_INFO_BLOCKING_MODE:
|
||||||
InfoReq->Information.Ulong = 0;
|
InfoReq->Information.Ulong = FCB->BlockingMode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AFD_INFO_RECEIVE_CONTENT_SIZE:
|
case AFD_INFO_RECEIVE_CONTENT_SIZE:
|
||||||
|
@ -53,6 +54,23 @@ AfdGetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
|
|
||||||
break;
|
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:
|
default:
|
||||||
AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n",
|
AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n",
|
||||||
InfoReq->InformationClass));
|
InfoReq->InformationClass));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue