X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fagilent-dmm%2Fapi.c;h=76349d8b157e460210bb498b55a7d705f45ec361;hb=c5ffac414899eb7f0e187b8eb9d61e381d40f0a6;hp=3f54481c5e44a58df5f24b4948cb06dbca03eb49;hpb=fb3a15059938770a064fb7d35a813cfa20d8e363;p=libsigrok.git diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 3f54481c..76349d8b 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -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 * @@ -91,7 +91,7 @@ static int clear_instances(void) static int hw_init(struct sr_context *sr_ctx) { - return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN); + return std_hw_init(sr_ctx, di, LOG_PREFIX); } static GSList *hw_scan(GSList *options) @@ -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; @@ -295,7 +298,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data devc->cb_data = cb_data; /* Send header packet to the session bus. */ - std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN); + std_session_send_df_header(cb_data, LOG_PREFIX); /* Poll every 100ms, or whenever some data comes in. */ serial = sdi->conn; @@ -307,7 +310,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close, - sdi->conn, DRIVER_LOG_DOMAIN); + sdi->conn, LOG_PREFIX); } SR_PRIV struct sr_dev_driver agdmm_driver_info = {