]> sigrok.org Git - libsigrok.git/commitdiff
rigol-ds: Deal with dev_close() getting called multiple times.
authorBert Vermeulen <redacted>
Mon, 27 Jan 2014 20:19:41 +0000 (21:19 +0100)
committerBert Vermeulen <redacted>
Mon, 27 Jan 2014 20:19:41 +0000 (21:19 +0100)
hardware/rigol-ds/api.c

index 76c2efc7c811d91fd6c9b9944845d0afc39719b5..f61d58ca1e01993ac656fe6eb34fc6c5a3bb2fc2 100644 (file)
@@ -482,6 +482,9 @@ static int dev_close(struct sr_dev_inst *sdi)
        struct sr_scpi_dev_inst *scpi;
        struct dev_context *devc;
 
+       if (sdi->status != SR_ST_INACTIVE)
+               return SR_OK;
+
        scpi = sdi->conn;
        devc = sdi->priv;