X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ffluke-dmm%2Fapi.c;h=17f50590d9adb53a63c4310582a0148f05c6347d;hb=refs%2Ftags%2Fdsupstream;hp=080301c428fded5cddcca063fffb372e7be636e8;hpb=919681f0e8b4681b2af64db72abc1945f3b4adb2;p=libsigrok.git diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index 080301c4..17f50590 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-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 * @@ -89,7 +89,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 *fluke_scan(const char *conn, const char *serialcomm) @@ -264,7 +264,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."); @@ -321,6 +321,9 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, 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; @@ -329,7 +332,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, 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; @@ -348,7 +351,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, 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 flukedmm_driver_info = {