dbus: Flush pending object manager signals in send_message
Denis Kenzior
AppliedHi Andrew,
Quoted 9 lines · Andrew Zaborowski
Make sure the PropertiesChanged and InterfacesAdded/Removed signals related to one object path are sent to the dbus socket in the order that they are generated in.
--- ell/dbus-private.h | 2 + ell/dbus-service.c | 160 ++++++++++++++++++++++++++++++++++++----------------- ell/dbus.c | 5 ++ 3 files changed, 117 insertions(+), 50 deletions(-)
Applied, thanks.
Regards,
-Denis
PATCH 1/1 dbus: Flush pending object manager signals in send_message
Make sure the PropertiesChanged and InterfacesAdded/Removed signals related to one object path are sent to the dbus socket in the order that they are generated in.
--- ell/dbus-private.h | 2 + ell/dbus-service.c | 160 ++++++++++++++++++++++++++++++++++++----------------- ell/dbus.c | 5 ++ 3 files changed, 117 insertions(+), 50 deletions(-)
ell/dbus-private.h +2 -0
@@ -229,6 +229,8 @@ bool _dbus_object_tree_property_changed(struct l_dbus *dbus,const char *interface_name, const char *property_name); +void _dbus_object_tree_signals_flush (struct l_dbus *dbus,const char *path); + typedef void (*_dbus_name_owner_change_func_t)(const char *name, uint64_t old_owner, uint64_t new_owner,
ell/dbus-service.c +110 -50
194 lines not on this page · raw message
ell/dbus.c +5 -0
@@ -306,6 +306,7 @@ static uint32_t send_message(struct l_dbus *dbus, bool priority, {struct message_callback *callback;enum dbus_message_type type; +const char *path; type =_dbus_message_get_type (message);
@@ -338,6 +339,10 @@ static uint32_t send_message(struct l_dbus *dbus, bool priority,return callback->serial; } + path =l_dbus_message_get_path (message); +if (path) +_dbus_object_tree_signals_flush (dbus, path); +l_queue_push_tail (dbus->message_queue, callback);if (dbus->is_ready)
Signature · 1 line
2.9.3