From: Uwe Hermann Date: Tue, 19 Nov 2013 18:20:50 +0000 (+0100) Subject: get_config(): Add a quickfix for xon_xoff. X-Git-Tag: libserialport-0.1.0~97 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=705bdc69470f98693afd065e6fd48bbc34872d6d;p=libserialport.git get_config(): Add a quickfix for xon_xoff. The config->xon_xoff variable is not filled correctly with data read from the current serial port config. Without this, the value of the variable will be bogus and some code that depends on the variable will fail. Note: This is just a temporary quickfix, not a proper final solution. --- diff --git a/serialport.c b/serialport.c index fc286cd..e654fc5 100644 --- a/serialport.c +++ b/serialport.c @@ -724,6 +724,9 @@ static enum sp_return get_config(struct sp_port *port, struct port_data *data, config->dtr = (data->controlbits & TIOCM_DTR) ? SP_DTR_ON : SP_DTR_OFF; config->dsr = SP_DSR_IGNORE; + + /* FIXME: Set config->xon_xoff properly, depending on data->term. */ + config->xon_xoff = SP_XONXOFF_DISABLED; #endif return SP_OK;