From 378833518a7f24645ec4d517cd809654cef67f88 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 13 Apr 2018 10:42:54 +0200 Subject: [PATCH] settings: return empty connections list on D-Bus util connections are loaded We also don't emit the PropertiesChanged signal while connections are not loaded. Maybe that is wrong, in any case, the property should agree with the way how we emit notifications. So, for now, make the property agree with not notifying about connections during startup. --- src/settings/nm-settings.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 3cb0f4fab5..d42994d728 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -1872,11 +1872,14 @@ get_property (GObject *object, guint prop_id, g_value_set_boolean (value, !!get_plugin (self, NM_SETTINGS_PLUGIN_CAP_MODIFY_CONNECTIONS)); break; case PROP_CONNECTIONS: - strv = nm_dbus_utils_get_paths_for_clist (&priv->connections_lst_head, - priv->connections_len, - G_STRUCT_OFFSET (NMSettingsConnection, _connections_lst), - TRUE); - g_value_take_boxed (value, nm_utils_strv_make_deep_copied (strv)); + if (priv->connections_loaded) { + strv = nm_dbus_utils_get_paths_for_clist (&priv->connections_lst_head, + priv->connections_len, + G_STRUCT_OFFSET (NMSettingsConnection, _connections_lst), + TRUE); + g_value_take_boxed (value, nm_utils_strv_make_deep_copied (strv)); + } else + g_value_set_boxed (value, NULL); break; case PROP_STARTUP_COMPLETE: g_value_set_boolean (value, nm_settings_get_startup_complete (self));