Opened 12 years ago

#4558 new Bugs

The "BOTHER" baud rate constant is not handled properly in asio

Reported by: Steve Soule <sts11dbxr@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

In the file boost/asio/impl/serial_port_base.ipp, in the functions boost::asio::serial_port_base::baud_rate::store and boost::asio::serial_port_base::baud_rate::load, the baud rate constant "BOTHER" is not handled in either switch statement. As far as I know, this constant, along with the termios fields c_ispeed and c_ospeed, are the only way to set and get an arbitrary baud rate (rather than one of the Posix baud rate constants like B9600) on Linux. So if the user requests a baud rate not listed, such as 250000 baud, the store functions incorrectly rejects it; and if the currently set baud rate is not one of the ones listed, the load function incorrectly fails to return it.

Change History (0)

Note: See TracTickets for help on using tickets.