From c0ddcf2998eace0290d22ddffb83e2a954ccb834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bellegarde?= Date: Sun, 23 Jun 2024 17:44:58 +0200 Subject: [PATCH] wwan: Ensure we get existing objects on reset When ModemManager become available, NetworkManager resets GDBusObjectManagerClient object. But there is a race condition if object-added is emitted before modm_ensure_manager(), we need to check existing objects if we want to be in sync with ModemManager. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1957 --- src/core/devices/wwan/nm-modem-manager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/devices/wwan/nm-modem-manager.c b/src/core/devices/wwan/nm-modem-manager.c index 4a89f38ef..6c184e87e 100644 --- a/src/core/devices/wwan/nm-modem-manager.c +++ b/src/core/devices/wwan/nm-modem-manager.c @@ -265,9 +265,7 @@ modm_handle_name_owner_changed(MMManager *modem_manager, GParamSpec *pspec, NMMo modm_clear_manager(self); modm_ensure_manager(self); - /* Whenever GDBusObjectManagerClient is fixed, we can just do the following: - * modm_manager_available (self); - */ + modm_manager_available (self); } static void