gdbus: Fix sending ObjectManager/Properties signals out of order
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 19 Aug 2013 11:39:28 +0000 (14:39 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 11 Sep 2013 02:07:28 +0000 (19:07 -0700)
commitf462a549f586d2baa6aa81b839d06391ff91cb6f
tree928875d28302c96c10746763dc976cd599532010
parentd7ba15373753c9ec42887529b929304aa223718e
gdbus: Fix sending ObjectManager/Properties signals out of order

In some cases the order of the messages is altered when a message is
sent without processing the pending signals first, currently this affect
client_check_order unit test:

/gdbus/client_check_order: **
ERROR:unit/test-gdbus-client.c:795:property_check_order: assertion failed: (g_strcmp0(string, "value1") == 0)

As can be observed the value of the property is not yet updated because the
signal it is still pending, once this fix is applied the test pass:

/gdbus/client_check_order: OK

Note that the flushing only works when g_dbus_send_message is used so
places where dbus_connection_send and other variants are called directly
may still change the order.
gdbus/object.c