[libvirt] [dbus PATCH] 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. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/gdbus.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gdbus.c b/src/gdbus.c index 2cce6ff..4e35477 100644 --- a/src/gdbus.c +++ b/src/gdbus.c @@ -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); - return; - } + if (error) + continue; g_return_if_fail(value); -- 2.17.1

On Mon, 2018-06-04 at 13:13 +0200, Pavel Hrdina wrote:
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.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/gdbus.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Reviewed-by: Katerina Koukiou <kkoukiou@redhat.com>
participants (2)
-
Katerina Koukiou
-
Pavel Hrdina