Don't reset the port baud rate to 0 in comOpen()
As noticed while trouble-shooting issue #813, calling comOpen() would (on Linux, at least) set the port baud rate to 0 bps (B0) which in most or all Linux serial drivers triggers special logic to deassert DTR and RTS signals (to the modem, to attempt to "hangup" any connection). If the app (e.g. sexpots) did not explictily set the port baud rate after calling comOpen(), the port would be unusable. This is not how comOpen() works on Windows. So rather than just overwrite all the bits in termios.c_cflag, we clear the fields we know we want to, set the bits we want, and leave the rest (which usually includes the current baud rate, if CBAUD is defined) as-is.
Please register or sign in to comment