From: Martin Ling Date: Tue, 16 Sep 2014 01:32:37 +0000 (+0100) Subject: atten-pps3xxx: Make serial write call block in scan. X-Git-Tag: libsigrok-0.4.0~975 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e7b4103697627bc985b77feb4c05dc67da8aebc0;p=libsigrok.git atten-pps3xxx: Make serial write call block in scan. This is called at scan time so free to block. There is no partial write handling and a response is expected afterwards. This should therefore be a blocking call. --- diff --git a/src/hardware/atten-pps3xxx/api.c b/src/hardware/atten-pps3xxx/api.c index d901649a..0d7c33e5 100644 --- a/src/hardware/atten-pps3xxx/api.c +++ b/src/hardware/atten-pps3xxx/api.c @@ -130,7 +130,7 @@ static GSList *scan(GSList *options, int modelid) memset(packet, 0, PACKET_SIZE); packet[0] = 0xaa; packet[1] = 0xaa; - if (serial_write(serial, packet, PACKET_SIZE) == -1) { + if (serial_write_blocking(serial, packet, PACKET_SIZE) == -1) { sr_err("Unable to write while probing for hardware: %s", strerror(errno)); return NULL;