rigol-ds: Check SCPI read is complete after reading expected block length.

This commit is contained in:
Martin Ling 2014-01-17 02:27:29 +00:00
parent 904fd29b72
commit 3ed7a40c75
1 changed files with 5 additions and 0 deletions

View File

@ -540,6 +540,11 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
if (devc->data_source != DATA_SOURCE_LIVE)
rigol_ds_set_wait_event(devc, WAIT_BLOCK);
}
if (!sr_scpi_read_complete(scpi)) {
sr_err("Read should have been completed");
sdi->driver->dev_acquisition_stop(sdi, cb_data);
return TRUE;
}
devc->num_block_read = 0;
} else {
sr_dbg("%d of %d block bytes read", devc->num_block_read, devc->num_block_bytes);