]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-pps/api.c
scpi-pps: don't break SCPI devices when scanning for HP-IB devices
[libsigrok.git] / src / hardware / scpi-pps / api.c
index ed9fbd9db20661a0c7b472e2741c39a89f17f560..aa5b945a3349cee0573491709d304efa424ccdc7 100644 (file)
@@ -254,6 +254,17 @@ static GSList *scan_scpi_pps(struct sr_dev_driver *di, GSList *options)
 
 static GSList *scan_hpib_pps(struct sr_dev_driver *di, GSList *options)
 {
+       const char *conn;
+
+       /*
+        * Only scan for HP-IB devices when conn= was specified, to not
+        * break SCPI devices' operation.
+        */
+       conn = NULL;
+       (void)sr_serial_extract_options(options, &conn, NULL);
+       if (!conn)
+               return NULL;
+
        return sr_scpi_scan(di->context, options, probe_hpib_pps_device);
 }