[virt-tools-list] [PATCH virt-viewer 2/2] ovirt-foreign-menu: Only set domain_valid once
Eduardo Lima (Etrunko)
etrunko at redhat.com
Fri Aug 16 17:44:12 UTC 2019
In the case of having a valid storage domain without any ISO files, this
variable can be reset to FALSE again in the next iteration of the loop,
resulting in a misleading error message presented to the user.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
---
src/ovirt-foreign-menu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
index 48b7b34..914cf0b 100644
--- a/src/ovirt-foreign-menu.c
+++ b/src/ovirt-foreign-menu.c
@@ -698,10 +698,12 @@ static void storage_domains_fetched_cb(GObject *source_object,
while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&domain)) {
OvirtCollection *file_collection;
- domain_valid = storage_domain_validate(menu, domain);
- if (!domain_valid)
+ if (!storage_domain_validate(menu, domain))
continue;
+ if (!domain_valid)
+ domain_valid = TRUE;
+
file_collection = ovirt_storage_domain_get_files(domain);
if (file_collection != NULL) {
if (menu->priv->files) {
--
2.21.0
More information about the virt-tools-list
mailing list