49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
diff -up colord-0.1.16/libcolord/cd-device.c.iter colord-0.1.16/libcolord/cd-device.c
|
|
--- colord-0.1.16/libcolord/cd-device.c.iter 2012-01-20 12:54:20.620011834 -0500
|
|
+++ colord-0.1.16/libcolord/cd-device.c 2012-01-20 13:15:12.164030613 -0500
|
|
@@ -464,7 +464,7 @@ cd_device_get_metadata_item (CdDevice *d
|
|
static void
|
|
cd_device_set_metadata_from_variant (CdDevice *device, GVariant *variant)
|
|
{
|
|
- GVariantIter *iter = NULL;
|
|
+ GVariantIter iter;
|
|
const gchar *prop_key;
|
|
const gchar *prop_value;
|
|
|
|
@@ -472,9 +472,8 @@ cd_device_set_metadata_from_variant (CdD
|
|
g_hash_table_remove_all (device->priv->metadata);
|
|
|
|
/* insert the new metadata */
|
|
- g_variant_get (variant, "a{ss}",
|
|
- &iter);
|
|
- while (g_variant_iter_loop (iter, "{ss}",
|
|
+ g_variant_iter_init (&iter, variant);
|
|
+ while (g_variant_iter_loop (&iter, "{ss}",
|
|
&prop_key, &prop_value)) {
|
|
g_hash_table_insert (device->priv->metadata,
|
|
g_strdup (prop_key),
|
|
diff -up colord-0.1.16/libcolord/cd-profile.c.iter colord-0.1.16/libcolord/cd-profile.c
|
|
--- colord-0.1.16/libcolord/cd-profile.c.iter 2011-09-13 07:38:56.000000000 -0400
|
|
+++ colord-0.1.16/libcolord/cd-profile.c 2012-01-20 13:15:15.379030662 -0500
|
|
@@ -432,7 +432,7 @@ cd_profile_get_metadata_item (CdProfile
|
|
static void
|
|
cd_profile_set_metadata_from_variant (CdProfile *profile, GVariant *variant)
|
|
{
|
|
- GVariantIter *iter = NULL;
|
|
+ GVariantIter iter;
|
|
const gchar *prop_key;
|
|
const gchar *prop_value;
|
|
|
|
@@ -440,9 +440,8 @@ cd_profile_set_metadata_from_variant (Cd
|
|
g_hash_table_remove_all (profile->priv->metadata);
|
|
|
|
/* insert the new metadata */
|
|
- g_variant_get (variant, "a{ss}",
|
|
- &iter);
|
|
- while (g_variant_iter_loop (iter, "{ss}",
|
|
+ g_variant_iter_init (&iter, variant);
|
|
+ while (g_variant_iter_loop (&iter, "{ss}",
|
|
&prop_key, &prop_value)) {
|
|
g_hash_table_insert (profile->priv->metadata,
|
|
g_strdup (prop_key),
|