On 11/01/2016 06:33 PM, Eduardo Lima (Etrunko) wrote:
> From: Christophe Fergeau <[email protected]>
>
> This is done with the new ovirt_foreign_menu_set_current_iso_name_async
> function. Also, an error dialog will be shown in case anything goes
> wrong with the async method.
>
> Signed-off-by: Eduardo Lima (Etrunko) <[email protected]>
> ---
> src/ovirt-foreign-menu.c | 40
> +++++++++++++++++++++++++++----------
> src/ovirt-foreign-menu.h | 9 ++++++++-
> src/remote-viewer-iso-list-dialog.c | 40
> +++++++++++++++++++++++++++++--------
> 3 files changed, 70 insertions(+), 19 deletions(-)
>
> diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
> index 8320552..288a812 100644
> --- a/src/ovirt-foreign-menu.c
> +++ b/src/ovirt-foreign-menu.c
[snip]
> @@ -382,7 +399,11 @@ static void updated_cdrom_cb(GObject *source_object,
> * the new ISO */
> if (error != NULL) {
> g_warning("failed to update cdrom resource: %s", error->message);
> - g_clear_error(&error);
> + g_task_return_error(task, error);
> + } else {
> + g_warn_if_reached();
> + g_task_return_new_error(task, OVIRT_ERROR, OVIRT_ERROR_FAILED,
> + "failed to update cdrom resource");
> }
The block above should be placed after resetting the file back to the
original, because in the case of error, on the dialog we will get the
outdated name. I will send the updated patch soon.
Regards, Eduardo
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
[email protected]
_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list