mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 05:30:17 +01:00
modem-manager: workaround issue in 'GDBusObjectManagerClient'
The 'GDBusObjectManagerClient' won't signal added or removed objects when it was created but no name owner was available in the bus. We can still use it for name-owner changes, but in order to have added/removed object signals, we'll need to re-create the whole 'MMManager' when we know the service came alive in the bus. See GLib/GIO/GDBus bug: https://bugzilla.gnome.org/show_bug.cgi?id=693285
This commit is contained in:
parent
03c1e40e66
commit
fb8ebc2a97
1 changed files with 13 additions and 1 deletions
|
|
@ -540,6 +540,7 @@ modem_manager_1_available (NMModemManager *self)
|
|||
|
||||
static void schedule_modem_manager_1_relaunch (NMModemManager *self,
|
||||
guint n_seconds);
|
||||
static void ensure_client (NMModemManager *self);
|
||||
|
||||
static void
|
||||
modem_manager_1_name_owner_changed (MMManager *modem_manager_1,
|
||||
|
|
@ -563,7 +564,18 @@ modem_manager_1_name_owner_changed (MMManager *modem_manager_1,
|
|||
|
||||
/* Available! */
|
||||
g_free (name_owner);
|
||||
modem_manager_1_available (self);
|
||||
|
||||
/* Hack alert: GDBusObjectManagerClient won't signal neither 'object-added'
|
||||
* nor 'object-removed' if it was created while there was no ModemManager in
|
||||
* the bus. This hack avoids this issue until we get a GIO with the fix
|
||||
* included... */
|
||||
modem_manager_1_clear_signals (self);
|
||||
g_clear_object (&self->priv->modem_manager_1);
|
||||
ensure_client (self);
|
||||
|
||||
/* Whenever GDBusObjectManagerClient is fixed, we can just do the following:
|
||||
* modem_manager_1_available (self);
|
||||
*/
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue