]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-pps/api.c
scpi-pps: sr_scpi_get_string() is already called by scpi_cmd_resp()
[libsigrok.git] / src / hardware / scpi-pps / api.c
index 1fddeea05ac8984c7742902ebd3866f026db9453..294c5a0e8e4617c8cb4f15715169347b7bcccf51 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <string.h>
 #include <strings.h>
 #include "scpi.h"
@@ -364,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")) {