From: poljar (Damir Jelić) Date: Thu, 16 Jan 2014 14:28:51 +0000 (+0100) Subject: hameg-hmo: Close the device after initial scan. X-Git-Tag: libsigrok-0.3.0~271 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=68e3d070144375fc01c54f0295a6c9acf726d9cc;hp=965b463d9825c2a72a3a1cfcc10e1a23ccc768aa;p=libsigrok.git hameg-hmo: Close the device after initial scan. 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. --- diff --git a/hardware/hameg-hmo/api.c b/hardware/hameg-hmo/api.c index 0877d235..3b474921 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: