]> sigrok.org Git - libsigrok.git/blobdiff - hardware/agilent-dmm/api.c
output: Use sr_config_get() wrapper
[libsigrok.git] / hardware / agilent-dmm / api.c
index 3f54481c5e44a58df5f24b4948cb06dbca03eb49..2bbd1e6478505272727a806595f514f36a27983e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
  *
  * Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
  *
@@ -231,7 +231,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        struct dev_context *devc;
 
        if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR;
+               return SR_ERR_DEV_CLOSED;
 
        if (!(devc = sdi->priv)) {
                sr_err("sdi->priv was NULL.");
@@ -287,6 +287,9 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data
        struct dev_context *devc;
        struct sr_serial_dev_inst *serial;
 
+       if (sdi->status != SR_ST_ACTIVE)
+               return SR_ERR_DEV_CLOSED;
+
        if (!(devc = sdi->priv)) {
                sr_err("sdi->priv was NULL.");
                return SR_ERR_BUG;