]> sigrok.org Git - libsigrok.git/commit
modbus: Close device after scan
authorv1ne <redacted>
Wed, 8 Apr 2020 15:05:16 +0000 (17:05 +0200)
committerUwe Hermann <redacted>
Sat, 11 Apr 2020 13:55:35 +0000 (15:55 +0200)
commit1d657f47be01b2194f6caa7c55d95fc869bd86dc
treefcd93e47bfe8b73dfb4da3453a3c2bf55e14ce55
parent8f3c77db26dece82109b386ad5ba7ea344b1ec8f
modbus: Close device after scan

Since the device should be closed after the scan, close it in sr_modbus_scan.
Alternatively, every single driver could close the device after calling
sr_modbus_scan. This causes duplicated code, is prone to forgetting it and it
wasn't the calling driver who opened the device in the first place.

This change unbreaks maynuo-m97 and rdtech-dps.
src/modbus/modbus.c