iface-modem: ensure the state change is flushed before the detailed notify
In order to ease the life for clients listening to the 'state-changed' signal, the change in the 'state' property in the DBus interface skeleton is flushed right away, before emitting 'state-changed'. By doing this we make sure that the 'state-changed' callbacks in the clients are able to see exactly the same current state in the modem proxy.
This commit is contained in:
@@ -1001,11 +1001,16 @@ mm_iface_modem_update_state (MMIfaceModem *self,
|
||||
NULL);
|
||||
|
||||
/* Signal status change */
|
||||
if (skeleton)
|
||||
if (skeleton) {
|
||||
/* Flush current change before signaling the state change,
|
||||
* so that clients get the proper state already in the
|
||||
* state-changed callback */
|
||||
g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (skeleton));
|
||||
mm_gdbus_modem_emit_state_changed (skeleton,
|
||||
old_state,
|
||||
new_state,
|
||||
reason);
|
||||
}
|
||||
|
||||
/* If we go to registered state (from unregistered), setup signal
|
||||
* quality and access technologies periodic retrieval */
|
||||
|
Reference in New Issue
Block a user