GDBus: Remove cached value if a property is invalidated

Also add a test case to catch this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2010-05-14 12:55:25 -04:00
parent bb6530eb34
commit ddc94bd0a6
3 changed files with 58 additions and 0 deletions

View File

@@ -696,6 +696,7 @@ on_properties_changed (GDBusConnection *connection,
GVariantIter iter;
gchar *key;
GVariant *value;
guint n;
error = NULL;
changed_properties = NULL;
@@ -728,6 +729,11 @@ on_properties_changed (GDBusConnection *connection,
value); /* adopts value */
}
for (n = 0; invalidated_properties[n] != NULL; n++)
{
g_hash_table_remove (proxy->priv->properties, invalidated_properties[n]);
}
/* emit signal */
g_signal_emit (proxy, signals[PROPERTIES_CHANGED_SIGNAL],
0,