X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fopenbench-logic-sniffer%2Fapi.c;h=1e22c5b82f97970c9a83e00c36419d47071ad583;hb=d1ad8b10bc9a928cb7b636bcf206ea59736a8658;hp=ecd8a081c8418cead64ab8c262e0103d89511c1d;hpb=15a5bfe4815f9991a9bb532c05d6244a1818a0e4;p=libsigrok.git diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index ecd8a081..1e22c5b8 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -90,14 +90,12 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) struct sr_config *src; struct sr_dev_inst *sdi; struct sr_serial_dev_inst *serial; - GSList *l, *devices; + GSList *l; int ret; unsigned int i; const char *conn, *serialcomm; char buf[8]; - devices = NULL; - conn = serialcomm = NULL; for (l = options; l; l = l->next) { src = l->data; @@ -191,11 +189,9 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) sdi->inst_type = SR_INST_SERIAL; sdi->conn = serial; - devices = g_slist_append(devices, sdi); - serial_close(serial); - return std_scan_complete(di, devices); + return std_scan_complete(di, g_slist_append(NULL, sdi)); } static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, @@ -547,7 +543,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) devc->cnt_bytes = devc->cnt_samples = devc->cnt_samples_rle = 0; memset(devc->sample, 0, 4); - std_session_send_df_header(sdi, LOG_PREFIX); + std_session_send_df_header(sdi); /* If the device stops sending for longer than it takes to send a byte, * that means it's finished. But wait at least 100 ms to be safe.