mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 20:00:23 +01:00
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.
This commit is contained in:
parent
e41db3fa55
commit
378833518a
1 changed files with 8 additions and 5 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue