Commit 9ceb91fb authored by Richard Hughes's avatar Richard Hughes
Browse files

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.
parent 04eff11a
......@@ -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;
......@@ -187,7 +186,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,
goto out;
......@@ -197,7 +195,6 @@ fu_provider_chug_get_firmware_version (FuProviderChugItem *item)
/* 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);
......@@ -632,12 +629,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, id);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment