Bug 1271 - std_serial_dev_acquisition_stop calling sr_dev_close superfluously
Summary: std_serial_dev_acquisition_stop calling sr_dev_close superfluously
Status: RESOLVED FIXED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Common: serial port code (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-06 10:21 CEST by Sylvain Munaut
Modified: 2019-11-02 16:45 CET (History)
1 user (show)



Attachments
Proposed fix (909 bytes, patch)
2018-10-13 15:53 CEST, Sylvain Munaut
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Munaut 2018-09-06 10:21:52 CEST
There seems to be no reason to call sr_dev_close inside of std_serial_dev_acquisition_stop.

This actually breaks pulseview because multiple run/stop cycle don't work.

This hasn't been an issue so far because pulseview supports multiple acquisition cycles and it only shows logic analyzers / scopes and none of the drivers for these use std_serial_dev_acquisition_stop. The only serial based LA is ols and it has its own acquisition_stop implementation.

The only drivers I could find that use std_serial_dev_acquisition_stop are DMM/LCR and those work fine when used in sigrok-cli because there is only one open/start/top/close cycle in that case and so the fact acq_stop calls dev_close doesn't prevent things from working.
Comment 1 Sylvain Munaut 2018-10-13 15:53:36 CEST
Created attachment 470 [details]
Proposed fix
Comment 2 Uwe Hermann 2019-11-02 16:45:35 CET
Fixed in cfdc80151b106ae83f3380cb308d53314974257a (added bug number to the commit msg), thanks!