mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-03 05:30:56 +00:00
Always persist ColorHug devices after replug
We need this to happen no matter the method of getting the version number else the reconnection idle loops do not work correctly.
This commit is contained in:
parent
2a1e75da72
commit
9a6a9c8b20
@ -53,7 +53,6 @@ typedef struct {
|
||||
GUsbDevice *usb_device;
|
||||
gboolean got_version;
|
||||
gboolean is_bootloader;
|
||||
gboolean persist_after_unplug;
|
||||
guint timeout_open_id;
|
||||
guint reconnect_id;
|
||||
GBytes *fw_bin;
|
||||
@ -171,7 +170,6 @@ fu_provider_chug_get_firmware_version (FuProviderChugItem *item)
|
||||
if (tmp != NULL) {
|
||||
item->got_version = TRUE;
|
||||
g_debug ("obtained fwver using extension '%s'", tmp);
|
||||
item->persist_after_unplug = FALSE;
|
||||
fu_device_set_metadata (item->device,
|
||||
FU_DEVICE_KEY_VERSION, tmp);
|
||||
goto out;
|
||||
@ -180,7 +178,6 @@ fu_provider_chug_get_firmware_version (FuProviderChugItem *item)
|
||||
g_usb_device_close (item->usb_device, NULL);
|
||||
|
||||
/* attempt to open the device and get the serial number */
|
||||
item->persist_after_unplug = TRUE;
|
||||
if (!ch_device_open (item->usb_device, &error)) {
|
||||
g_debug ("Failed to claim interface, polling: %s", error->message);
|
||||
return;
|
||||
@ -582,12 +579,6 @@ fu_provider_chug_device_removed_cb (GUsbContext *ctx,
|
||||
item->timeout_open_id = 0;
|
||||
}
|
||||
fu_provider_device_remove (FU_PROVIDER (provider_chug), item->device);
|
||||
|
||||
/* if we got the version from an extension then it's best to
|
||||
* rescan each time so we don't get confused when different
|
||||
* kinds of ColorHug device are plugged in... */
|
||||
if (!item->persist_after_unplug)
|
||||
g_hash_table_remove (priv->devices, platform_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user