Re: serial purge bug in rdesktop 1.6.0
Peter Åstrand <[email protected]>
| Newsgroups | gmane.network.rdesktop.devel |
|---|---|
| Message-ID | <[email protected]> |
> case SERIAL_PURGE: ... > In this section , TCIFLUSH is defiend to 0, so tciflush will never be > reached when doing TCIFLUSH operation. Thanks for finding this. Can you try the attached patch? Best regards, --- Peter Åstrand ThinLinc Chief Developer Cendio AB http://www.cendio.com Wallenbergs gata 4 583 30 Linköping Phone: +46-13-21 46 00 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ rdesktop-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdesktop-devel
flush.patch
(text/plain, 967 B)
Index: serial.c
===================================================================
--- serial.c (revision 1521)
+++ serial.c (arbetskopia)
@@ -895,13 +895,13 @@
case SERIAL_PURGE:
in_uint32(in, purge_mask);
DEBUG_SERIAL(("serial_ioctl -> SERIAL_PURGE purge_mask %X\n", purge_mask));
- flush_mask = 0;
- if (purge_mask & SERIAL_PURGE_TXCLEAR)
- flush_mask |= TCOFLUSH;
- if (purge_mask & SERIAL_PURGE_RXCLEAR)
- flush_mask |= TCIFLUSH;
- if (flush_mask != 0)
- tcflush(handle, flush_mask);
+ if ((purge_mask & SERIAL_PURGE_TXCLEAR)
+ && (purge_mask & SERIAL_PURGE_RXCLEAR))
+ tcflush(handle, TCIOFLUSH);
+ else if (purge_mask & SERIAL_PURGE_TXCLEAR)
+ tcflush(handle, TCOFLUSH);
+ else if (purge_mask & SERIAL_PURGE_RXCLEAR)
+ tcflush(handle, TCIFLUSH);
if (purge_mask & SERIAL_PURGE_TXABORT)
rdpdr_abort_io(handle, 4, RD_STATUS_CANCELLED);
if (purge_mask & SERIAL_PURGE_RXABORT)