rigol-ds: Improve protocol debugging output, abort on read errors.
This commit is contained in:
parent
2b399703d1
commit
ae3a191366
|
@ -535,12 +535,16 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
len = devc->num_block_bytes - devc->num_block_read;
|
len = devc->num_block_bytes - devc->num_block_read;
|
||||||
len = sr_scpi_read_data(scpi, (char *)devc->buffer,
|
if (len > ACQ_BUFFER_SIZE)
|
||||||
len < ACQ_BUFFER_SIZE ? len : ACQ_BUFFER_SIZE);
|
len = ACQ_BUFFER_SIZE;
|
||||||
|
sr_dbg("Requesting read of %d bytes", len);
|
||||||
|
|
||||||
|
len = sr_scpi_read_data(scpi, (char *)devc->buffer, len);
|
||||||
|
|
||||||
|
if (len == -1)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
sr_dbg("Received %d bytes.", len);
|
sr_dbg("Received %d bytes.", len);
|
||||||
if (len == -1)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
devc->num_block_read += len;
|
devc->num_block_read += len;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue