gnetworkmonitornm: Do not re-update cached property

GDBusProxy already takes care of updating the cached property
before emitting the signal, so there is no need to do this
a second time ourselves.
This commit is contained in:
Julian Andres Klode 2021-10-12 17:31:42 +02:00 committed by Michael Catanzaro
parent 8e0a5d9879
commit 56e6e247f6

View File

@ -252,34 +252,12 @@ sync_properties (GNetworkMonitorNM *nm,
}
}
static void
update_cached_property (GDBusProxy *proxy,
const char *property_name,
GVariantDict *dict)
{
GVariant *v;
v = g_variant_dict_lookup_value (dict, property_name, NULL);
if (!v)
return;
g_dbus_proxy_set_cached_property (proxy, property_name, v);
g_variant_unref (v);
}
static void
proxy_properties_changed_cb (GDBusProxy *proxy,
GVariant *changed_properties,
GStrv invalidated_properties,
GNetworkMonitorNM *nm)
{
GVariantDict *dict;
dict = g_variant_dict_new (changed_properties);
update_cached_property (nm->priv->proxy, "Connectivity", dict);
g_variant_dict_unref (dict);
sync_properties (nm, TRUE);
}