From: Aurelien Jacobs Date: Sun, 20 Sep 2015 14:22:21 +0000 (+0200) Subject: scpi-pps: sr_scpi_get_string() is already called by scpi_cmd_resp() X-Git-Tag: libsigrok-0.4.0~273 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=d66c93ccdafabffc0dda4f16bf3924a829cdb3bd scpi-pps: sr_scpi_get_string() is already called by scpi_cmd_resp() This double call was causing the following error: sr: scpi_usbtmc: USBTMC bulk in transfer error: LIBUSB_ERROR_TIMEOUT. --- diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index fbc71cee..294c5a0e 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -365,8 +365,7 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s * return VOLT/CURR. We always return a GVariant string in * the Rigol notation. */ - if ((ret = sr_scpi_get_string(sdi->conn, NULL, &s)) != SR_OK) - return ret; + s = g_variant_get_string(*data, NULL); if (!strcmp(s, "CV") || !strcmp(s, "VOLT")) { *data = g_variant_new_string("CV"); } else if (!strcmp(s, "CC") || !strcmp(s, "CURR")) {