aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-08-19 16:54:35 +0300
committerMarcel Holtmann <marcel@holtmann.org>2013-09-10 19:06:11 -0700
commitd2dcaf4be8db8f3d45d873460b3d59503df2cd8d (patch)
treeda802e83ddbee5a1c7c453635053d3cd16cd4bba
parentdf70ce1c6c67d02bc33cf2cbda705e01b486e300 (diff)
downloadmmsd-d2dcaf4be8db8f3d45d873460b3d59503df2cd8d.tar.gz
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.
-rw-r--r--gdbus/object.c4
1 files changed, 2 insertions, 2 deletions
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,