mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-08 12:31:49 +00:00
Only request the BOS descriptor for newer libgusb versions
This fixes a deadlock only recently debugged and fixed in GUsb.
This commit is contained in:
parent
71af241835
commit
ac27638878
@ -367,7 +367,7 @@ fu_usb_device_setup(FuDevice *device, GError **error)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if G_USB_CHECK_VERSION(0, 4, 0)
|
#if G_USB_CHECK_VERSION(0, 4, 2)
|
||||||
/* get the platform capability BOS descriptors */
|
/* get the platform capability BOS descriptors */
|
||||||
bos_descriptors = g_usb_device_get_bos_descriptors(priv->usb_device, NULL);
|
bos_descriptors = g_usb_device_get_bos_descriptors(priv->usb_device, NULL);
|
||||||
for (guint i = 0; bos_descriptors != NULL && i < bos_descriptors->len; i++) {
|
for (guint i = 0; bos_descriptors != NULL && i < bos_descriptors->len; i++) {
|
||||||
|
@ -3181,7 +3181,7 @@ fu_backend_usb_func(gconstpointer user_data)
|
|||||||
g_autoptr(GPtrArray) possible_plugins = NULL;
|
g_autoptr(GPtrArray) possible_plugins = NULL;
|
||||||
g_autoptr(JsonParser) parser = json_parser_new();
|
g_autoptr(JsonParser) parser = json_parser_new();
|
||||||
|
|
||||||
#if !G_USB_CHECK_VERSION(0, 4, 0)
|
#if !G_USB_CHECK_VERSION(0, 4, 2)
|
||||||
g_test_skip("GUsb version too old");
|
g_test_skip("GUsb version too old");
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
@ -3244,7 +3244,7 @@ fu_backend_usb_invalid_func(gconstpointer user_data)
|
|||||||
g_autoptr(GPtrArray) devices = NULL;
|
g_autoptr(GPtrArray) devices = NULL;
|
||||||
g_autoptr(JsonParser) parser = json_parser_new();
|
g_autoptr(JsonParser) parser = json_parser_new();
|
||||||
|
|
||||||
#if !G_USB_CHECK_VERSION(0, 4, 0)
|
#if !G_USB_CHECK_VERSION(0, 4, 2)
|
||||||
g_test_skip("GUsb version too old");
|
g_test_skip("GUsb version too old");
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user