From: Martin Ling Date: Tue, 16 Sep 2014 01:11:05 +0000 (+0100) Subject: agilent-dmm: Make serial write call block in scan. X-Git-Tag: libsigrok-0.4.0~979 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=485b9ae34d37395ef1a77b5aedb337446aafddb9;p=libsigrok.git 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. --- 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;