Commit 4d71327c authored by Thomas Haller's avatar Thomas Haller

manager: process events of platform cache during nm_manager_start()

Possibly pending messages from the netlink socket were not processed
since the platform instance was created earlier. As nm_manager_start()
may take a long time to run, make sure that there are no pending
messages before querying the devices.
parent 6845b9b8
......@@ -4814,11 +4814,6 @@ nm_manager_start (NMManager *self, GError **error)
if (!nm_settings_start (priv->settings, error))
return FALSE;
g_signal_connect (NM_PLATFORM_GET,
NM_PLATFORM_SIGNAL_LINK_CHANGED,
G_CALLBACK (platform_link_cb),
self);
/* Set initial radio enabled/disabled state */
for (i = 0; i < RFKILL_TYPE_MAX; i++) {
RadioState *rstate = &priv->radio_states[i];
......@@ -4851,6 +4846,13 @@ nm_manager_start (NMManager *self, GError **error)
nm_device_factory_manager_load_factories (_register_device_factory, self);
nm_device_factory_manager_for_each_factory (start_factory, NULL);
nm_platform_process_events (NM_PLATFORM_GET);
g_signal_connect (NM_PLATFORM_GET,
NM_PLATFORM_SIGNAL_LINK_CHANGED,
G_CALLBACK (platform_link_cb),
self);
platform_query_devices (self);
/* Load VPN plugins */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment