diff options
Diffstat (limited to 'rdcp_realmdrealm.h')
-rw-r--r-- | rdcp_realmdrealm.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/rdcp_realmdrealm.h b/rdcp_realmdrealm.h index cc70395..a59957c 100644 --- a/rdcp_realmdrealm.h +++ b/rdcp_realmdrealm.h @@ -175,19 +175,27 @@ KINLINE bool SupportsDBusInterface(GVariant *dbus_props, const char *dbus_interf } \ \ if (g_variant_lookup(dbus_props, "Configured", "&s", &value)) { \ - klass##_Set_Configured(obj, value); \ + if (strlen(value) == 0) { \ + klass##_Null_Configured(obj); \ + } else { \ + char *interface_name = get_short_dbus_interface_name(value); \ + klass##_Set_Configured(obj, interface_name); \ + g_free(interface_name); \ + } \ } \ \ if (g_variant_lookup(dbus_props, "SupportedInterfaces", "as", &iter)) { \ n_items = g_variant_iter_n_children(iter); \ klass##_Init_SupportedInterfaces(obj, n_items); \ for (i = 0; g_variant_iter_next(iter, "&s", &value); i++) { \ - klass##_Set_SupportedInterfaces(obj, i, value); \ + char *interface_name = get_short_dbus_interface_name(value); \ + klass##_Set_SupportedInterfaces(obj, i, interface_name); \ + g_free(interface_name); \ } \ g_variant_iter_free(iter); \ } \ \ - if (g_variant_lookup(dbus_props, "Details", "a(ss)", &iter)) { \ + if (g_variant_lookup(dbus_props, "Details", "a(ss)", &iter)) { \ n_items = g_variant_iter_n_children(iter); \ klass##_Init_DetailNames(obj, n_items); \ klass##_Init_DetailValues(obj, n_items); \ |