]> sigrok.org Git - libsigrok.git/commitdiff
hameg-hmo: Close the device after initial scan.
authorpoljar (Damir Jelić) <redacted>
Thu, 16 Jan 2014 14:28:51 +0000 (15:28 +0100)
committerBert Vermeulen <redacted>
Thu, 16 Jan 2014 15:27:35 +0000 (16:27 +0100)
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

index 0877d235719292efaf7561e97950b874c4fe1133..3b474921d6699cfac35c717d5484b9a5ee652986 100644 (file)
@@ -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: