From: Alexandru Gagniuc Date: Thu, 16 Apr 2015 04:30:10 +0000 (-0700) Subject: scpi: Accept *IDN responses with more than four tokens X-Git-Tag: libsigrok-0.4.0~516 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0c08023f506c164e6d7bdf46cd82ef437a468997;p=libsigrok.git scpi: Accept *IDN responses with more than four tokens Some devices with more than one microcontroller report the firmware version for each of them, giving us more than four tokens. When that happens, sigrok aborts, even though it received a valid response. This happens, for example with the Chroma 61604: 'Chroma ATE,61604,001060,1.25,1.34,1.20' --- diff --git a/src/scpi/scpi.c b/src/scpi/scpi.c index 52fe76dd..c3ef6ff7 100644 --- a/src/scpi/scpi.c +++ b/src/scpi/scpi.c @@ -735,7 +735,7 @@ SR_PRIV int sr_scpi_get_hw_id(struct sr_scpi_dev_inst *scpi, for (num_tokens = 0; tokens[num_tokens] != NULL; num_tokens++); - if (num_tokens != 4) { + if (num_tokens < 4) { sr_dbg("IDN response not according to spec: %80.s.", response); g_strfreev(tokens); g_free(response);