The device is after a scan left open and clients that don't call unconditionally
dev_open() will never fetch the initial device state.

Close the device after the scan so clients know they need to open it.
---
 hardware/hameg-hmo/api.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hardware/hameg-hmo/api.c b/hardware/hameg-hmo/api.c
index 0877d23..3b47492 100644
--- a/hardware/hameg-hmo/api.c
+++ b/hardware/hameg-hmo/api.c
@@ -251,6 +251,10 @@ static struct sr_dev_inst *hmo_probe_serial_device(const 
char *serial_device,
        if (hmo_init_device(sdi) != SR_OK)
                goto fail;
 
+       sr_scpi_close(sdi->conn);
+
+       sdi->status = SR_ST_INACTIVE;
+
        return sdi;
 
 fail:
-- 
1.8.5.3


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to