<html>
<tt>Chris,<br>
Per your comments on my prior patches, I have re-architected my
error-checking changes so that the short-circuiting behavior in
tcsetattr() is gone. I also cleaned up the B0 (ie. drop DTR)
support to more closely resemble what POSIX expects while not enraging
Win32 :) Please let me know if this passes muster - the prior test
case program still applies. My only remaining question is why errno
isn't being propagated back up to the application? Thanks,<br>
<br>
-Troy<br>
<br>
2003-01-22 Troy Curtiss <troyc@usa.net><br>
<br>
<x-tab> </x-tab>*
fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking<br>
<x-tab> </x-tab>so that if
any Win32 SetComm*() calls fail, errno gets set to EINVAL<br>
and tcsetattr() returns -1. Catches invalid
bitrates, mostly.<br>
<x-tab> </x-tab>*
fhandler_serial.cc (fhandler_serial::tcsetattr): If baud rate
setting<br>
is B0, just drop DTR and leave Win32 DCB bitrate
as-is since 0 is not<br>
a valid Win32 setting.<br>
<x-tab> </x-tab>(fhandler_serial::tcgetattr):
If DTR is low, populate the bitrate as B0,<br>
otherwise get it from the DCB. Works
around Win32's lack of bitrate 0<br>
at the expense of using DTR as the flag (POSIX
behavior.)</html>