From 485b9ae34d37395ef1a77b5aedb337446aafddb9 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Tue, 16 Sep 2014 02:11:05 +0100 Subject: [PATCH] agilent-dmm: Make serial write call block in scan. This call is executed at scan time so is free to block. There is no handling for a partial write and a response is expected immediately afterwards. It should therefore be a blocking call. --- src/hardware/agilent-dmm/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c index 1c18c99c..c89d18ed 100644 --- a/src/hardware/agilent-dmm/api.c +++ b/src/hardware/agilent-dmm/api.c @@ -116,7 +116,7 @@ static GSList *scan(GSList *options) return NULL; serial_flush(serial); - if (serial_write(serial, "*IDN?\r\n", 7) == -1) { + if (serial_write_blocking(serial, "*IDN?\r\n", 7) == -1) { sr_err("Unable to send identification string: %s.", strerror(errno)); return NULL;