> Is the device driver's or the serial port's close an issue? Or > one of them first and the other one as a consequence? Haven't > checked the code base, so I'm talking from the top of my head > here, and may miss something.
It's independent of serial ports. I am quite confident bugs #1151 and #1275 are caused by this, too, and they talk USB. I found that out after I sent this patch. > I'm afraid the "sdi->status == SR_ST_ACTIVE" check only will tell > whether a data acquisition is running, not whether the device got > opened and still is. Haven't dug up a better condition though. I based my code on the following comment for sr_dev_open(): 650 /** 651 * Open the specified device instance. 652 * 653 * If the device instance is already open (sdi->status == SR_ST_ACTIVE), 654 * SR_ERR will be returned and no re-opening of the device will be attempted. 655 * 656 * If opening was successful, sdi->status is set to SR_ST_ACTIVE, otherwise 657 * it will be left unchanged. 658 * 659 * @param sdi Device instance to use. Must not be NULL. 660 * 661 * @retval SR_OK Success. 662 * @retval SR_ERR_ARG Invalid arguments. 663 * @retval SR_ERR Device instance was already active, or other error. 664 * 665 * @since 0.2.0 666 */
signature.asc
Description: PGP signature
_______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel