Update of /cvsroot/com0com/com0com
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29056
Modified Files:
ioctl.c
Log Message:
Implemented SERIAL_RX_WAITING_FOR_DSR
Index: ioctl.c
===================================================================
RCS file: /cvsroot/com0com/com0com/ioctl.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ioctl.c 17 May 2006 15:31:14 -0000 1.19
--- ioctl.c 18 May 2006 08:00:30 -0000 1.20
***************
*** 20,23 ****
--- 20,26 ----
*
* $Log$
+ * Revision 1.20 2006/05/18 08:00:30 vfrolov
+ * Implemented SERIAL_RX_WAITING_FOR_DSR
+ *
* Revision 1.19 2006/05/17 15:31:14 vfrolov
* Implemented SERIAL_TRANSMIT_TOGGLE
***************
*** 337,344 ****
pSysBuf = (PSERIAL_STATUS)pIrp->AssociatedIrp.SystemBuffer;
pIoPort = pDevExt->pIoPortLocal;
KeAcquireSpinLock(pDevExt->pIoLock, &oldIrql);
! RtlZeroMemory(pSysBuf, sizeof(*pSysBuf));
pSysBuf->AmountInInQueue = (ULONG)C0C_BUFFER_BUSY(&pIoPort->readBuf);
--- 340,348 ----
pSysBuf = (PSERIAL_STATUS)pIrp->AssociatedIrp.SystemBuffer;
+ RtlZeroMemory(pSysBuf, sizeof(*pSysBuf));
pIoPort = pDevExt->pIoPortLocal;
KeAcquireSpinLock(pDevExt->pIoLock, &oldIrql);
!
pSysBuf->AmountInInQueue = (ULONG)C0C_BUFFER_BUSY(&pIoPort->readBuf);
***************
*** 357,363 ****
--- 361,376 ----
pSysBuf->AmountInOutQueue = pIoPort->amountInWriteQueue;
pSysBuf->HoldReasons = pIoPort->writeHolding;
+
+ if ((pIoPort->pDevExt->handFlow.ControlHandShake & SERIAL_DSR_SENSITIVITY) &&
+ (pIoPort->modemStatus & C0C_MSB_DSR) == 0)
+ {
+ pSysBuf->HoldReasons |= SERIAL_RX_WAITING_FOR_DSR;
+ }
+
pSysBuf->Errors = pIoPort->errors;
pIoPort->errors = 0;
+
KeReleaseSpinLock(pDevExt->pIoLock, oldIrql);
+
pIrp->IoStatus.Information = sizeof(SERIAL_STATUS);
|