From: Luiz Augusto von Dentz Date: Mon, 19 Aug 2013 13:54:35 +0000 (+0300) Subject: gdbus: Fix emitting PropertiesChanged twice X-Git-Tag: 1.13~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=778b60a94f12496e18435d62f399b94b243ac206;p=platform%2Fupstream%2Fofono.git gdbus: Fix emitting PropertiesChanged twice This fixes double emission of PropertiesChanged introduced by flushing changes, the flushing can happen during the pending processing so the pending_prop flag needs to be updated in the beginning and the list of properties can be freed before g_dbus_send_message as it is not required anymore. --- diff --git a/gdbus/object.c b/gdbus/object.c index c4cf724..0822fe8 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -1642,6 +1642,8 @@ static void process_properties_from_interface(struct generic_data *data, DBusMessageIter iter, dict, array; GSList *invalidated; + data->pending_prop = FALSE; + if (iface->pending_prop == NULL) return; @@ -1708,8 +1710,6 @@ static void process_property_changes(struct generic_data *data) process_properties_from_interface(data, iface); } - - data->pending_prop = FALSE; } void g_dbus_emit_property_changed(DBusConnection *connection,