From 7772dcfc91b5b87c2a3892db442c82dba5f74772 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 10 Sep 2018 15:49:59 +0100 Subject: [PATCH] trivial: Ensure the daemon sends IDLE when firmware is updated --- plugins/csr/fu-csr-device.c | 9 +-------- plugins/ebitdo/fu-ebitdo-device.c | 1 - plugins/flashrom/fu-plugin-flashrom.c | 2 -- src/fu-engine.c | 2 +- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/plugins/csr/fu-csr-device.c b/plugins/csr/fu-csr-device.c index b87a71e40..eacb8167b 100644 --- a/plugins/csr/fu-csr-device.c +++ b/plugins/csr/fu-csr-device.c @@ -331,7 +331,6 @@ fu_csr_device_upload (FuDevice *device, GError **error) } /* notify UI */ - fu_device_set_status (device, FWUPD_STATUS_IDLE); return dfu_utils_bytes_join_array (chunks); } @@ -505,13 +504,7 @@ fu_csr_device_download (FuDevice *device, GBytes *blob, GError **error) /* all done */ blob_empty = g_bytes_new (NULL, 0); - if (!fu_csr_device_download_chunk (self, idx, blob_empty, error)) - return FALSE; - - /* notify UI */ - fu_device_set_status (device, FWUPD_STATUS_IDLE); - - return TRUE; + return fu_csr_device_download_chunk (self, idx, blob_empty, error); } static gboolean diff --git a/plugins/ebitdo/fu-ebitdo-device.c b/plugins/ebitdo/fu-ebitdo-device.c index 12d9e4855..334f105ae 100644 --- a/plugins/ebitdo/fu-ebitdo-device.c +++ b/plugins/ebitdo/fu-ebitdo-device.c @@ -545,7 +545,6 @@ fu_ebitdo_device_write_firmware (FuDevice *device, GBytes *fw, GError **error) } /* success! */ - fu_device_set_status (device, FWUPD_STATUS_IDLE); return TRUE; } diff --git a/plugins/flashrom/fu-plugin-flashrom.c b/plugins/flashrom/fu-plugin-flashrom.c index 8465d81fc..34ddfe2b6 100644 --- a/plugins/flashrom/fu-plugin-flashrom.c +++ b/plugins/flashrom/fu-plugin-flashrom.c @@ -154,7 +154,6 @@ fu_plugin_update_prepare (FuPlugin *plugin, g_prefix_error (error, "failed to get original firmware: "); return FALSE; } - fu_device_set_status (device, FWUPD_STATUS_IDLE); } return TRUE; @@ -198,6 +197,5 @@ fu_plugin_update (FuPlugin *plugin, return FALSE; /* success */ - fu_device_set_status (device, FWUPD_STATUS_IDLE); return TRUE; } diff --git a/src/fu-engine.c b/src/fu-engine.c index 5c291887d..69f9e5a67 100644 --- a/src/fu-engine.c +++ b/src/fu-engine.c @@ -1576,7 +1576,7 @@ fu_engine_install_blob (FuEngine *self, } /* make the UI update */ - fu_device_set_status (device, FWUPD_STATUS_IDLE); + fu_engine_set_status (self, FWUPD_STATUS_IDLE); fu_engine_emit_changed (self); g_debug ("Updating %s took %f seconds", fu_device_get_name (device), g_timer_elapsed (timer, NULL));