Commit bd32e559 authored by Pavel Hrdina's avatar Pavel Hrdina

gdbus: Don't report libvirt errors for GetAll method on properties

According to D-Bus specification if some property is not accessible
it may be omitted in the returned list of properties.  However, such
error needs to be reported for Get method on that property.

In libvirt-dbus this can happen for Domain.SchedulerType property
for QEMU session connection.
Reviewed-by: default avatarKaterina Koukiou <>
Signed-off-by: Pavel Hrdina's avatarPavel Hrdina <>
parent bc058714
......@@ -163,20 +163,19 @@ virtDBusGDBusHandlePropertyGetAll(GDBusMethodInvocation *invocation,
GVariant *value;
g_auto(GVariantBuilder) builder;
g_autoptr(GError) error = NULL;
g_variant_builder_init(&builder, G_VARIANT_TYPE("(a{sv})"));
g_variant_builder_open(&builder, G_VARIANT_TYPE("a{sv}"));
for (gint i = 0; data->properties[i].name; i++) {
g_autoptr(GError) error = NULL;
data->properties[i].getFunc(objectPath, data->userData,
&value, &error);
if (error) {
g_dbus_method_invocation_return_gerror(invocation, error);
if (error)
Markdown is supported
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