wwan: Ensure we get existing objects on reset
Summary
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.
Purpose
Droidian is using ofono2mm as a gate between NetworkManager and OFono. On Miatoll devices, race condition occurs quite often with /ril_0 unconfigured (NetworkManager does not know the modem exists).
Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
-
the subject for all commits is concise and explicative -
the message for all commits explains the reason for the change -
the source is properly formatted -
any relevant documentation is up to date -
you have added unit tests if applicable -
the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.