Revert "scpi: Don't process received data of zero length"

Undo the change which skips management activities when no data was
received. This change breaks the current implementation, and needs to
get deferred until a delicate interaction between the resize and the
read logic has been eliminated.
This commit is contained in:
Gerhard Sittig 2017-01-07 21:16:33 +01:00
parent 2ea1fdf121
commit d5a61aaf2d
1 changed files with 2 additions and 2 deletions

View File

@ -448,9 +448,9 @@ SR_PRIV int sr_scpi_get_data(struct sr_scpi_dev_inst *scpi,
return SR_ERR;
} else if (len > 0) {
laststart = g_get_monotonic_time();
offset += len;
g_string_set_size(response, offset);
}
offset += len;
g_string_set_size(response, offset);
elapsed_ms = (g_get_monotonic_time() - laststart) / 1000;
if (elapsed_ms >= scpi->read_timeout_ms) {
sr_err("Timed out waiting for SCPI response.");