On Sun, 2020-05-03 at 20:11 +0200, Wolfram Sang wrote: > > > @@ -122,6 +122,10 @@ SR_PRIV int serial_open(struct sr_serial_dev_inst > > *serial, int flags) > > if (ret != SR_OK) > > return ret; > > > > + ret = serial_flush(serial); > > + if (ret != SR_OK) > > + return ret; > > + > > if (serial->serialcomm) > > return serial_set_paramstr(serial, serial->serialcomm); > > else > > On second thought, maybe we should flush the buffer *after* setting the > parameters like this? > > 125 if (serial->serialcomm) { > 126 ret = serial_set_paramstr(serial, serial->serialcomm); > 127 if (ret != SR_OK) > 128 return ret; > 129 } > 130 > 131 return serial_flush(serial);
Yes, this has come up off list, in the chat (the place where you keep walking away after saying "Hi" :-] ). It was felt that flushing data after the re-configuration might have caused some confusion is the most appropriate spot. Can get addressed in a follow-up commit after your introduction of flush, unless you squash that into yours. Either should be fine. virtually yours Gerhard Sittig -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel