The usb_get_port_path() function opens the passed device on FreeBSD,
which fails if the device has already been open.
---
src/hardware/chronovu-la/api.c | 4 ++--
src/hardware/dreamsourcelab-dslogic/api.c | 4 ++--
src/hardware/fx2lafw/api.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c
index 3d19b4f0..685a3a9d 100644
--- a/src/hardware/chronovu-la/api.c
+++ b/src/hardware/chronovu-la/api.c
@@ -192,10 +192,10 @@ static GSList *scan(struct sr_dev_driver *di, GSList
*options)
continue;
}
- usb_get_port_path(devlist[i], connection_id,
sizeof(connection_id));
-
libusb_close(hdl);
+ usb_get_port_path(devlist[i], connection_id,
sizeof(connection_id));
+
if (!strcmp(product, "ChronoVu LA8"))
model = 0;
else if (!strcmp(product, "ChronoVu LA16"))
diff --git a/src/hardware/dreamsourcelab-dslogic/api.c
b/src/hardware/dreamsourcelab-dslogic/api.c
index 66c81037..449e0072 100644
--- a/src/hardware/dreamsourcelab-dslogic/api.c
+++ b/src/hardware/dreamsourcelab-dslogic/api.c
@@ -214,10 +214,10 @@ static GSList *scan(struct sr_dev_driver *di, GSList
*options)
continue;
}
- usb_get_port_path(devlist[i], connection_id,
sizeof(connection_id));
-
libusb_close(hdl);
+ usb_get_port_path(devlist[i], connection_id,
sizeof(connection_id));
+
prof = NULL;
for (j = 0; supported_device[j].vid; j++) {
if (des.idVendor == supported_device[j].vid &&
diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c
index 34c5bc41..862719f3 100644
--- a/src/hardware/fx2lafw/api.c
+++ b/src/hardware/fx2lafw/api.c
@@ -251,10 +251,10 @@ static GSList *scan(struct sr_dev_driver *di, GSList
*options)
continue;
}
- usb_get_port_path(devlist[i], connection_id,
sizeof(connection_id));
-
libusb_close(hdl);
+ usb_get_port_path(devlist[i], connection_id,
sizeof(connection_id));
+
prof = NULL;
for (j = 0; supported_fx2[j].vid; j++) {
if (des.idVendor == supported_fx2[j].vid &&
--
2.15.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel