mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-24 02:03:56 +03:00
ovirt: Only use active ISO domains for foreign menu
oVirt storage domains can be in various states (inactive, in maintainance, ...). We only want to show the ISOs it contains in the foreign menu when the storage domain is actually active, not in the other states. https://bugzilla.redhat.com/show_bug.cgi?id=1310450
This commit is contained in:
parent
3e42ec7c39
commit
0ea2a674b8
@ -650,12 +650,17 @@ static void storage_domains_fetched_cb(GObject *source_object,
|
||||
while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&domain)) {
|
||||
OvirtCollection *file_collection;
|
||||
int type;
|
||||
int state;
|
||||
|
||||
g_object_get(domain, "type", &type, NULL);
|
||||
g_object_get(domain, "type", &type, "state", &state, NULL);
|
||||
if (type != OVIRT_STORAGE_DOMAIN_TYPE_ISO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state != OVIRT_STORAGE_DOMAIN_STATE_ACTIVE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
file_collection = ovirt_storage_domain_get_files(domain);
|
||||
if (file_collection != NULL) {
|
||||
if (menu->priv->files) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user