mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 16:20:34 +01:00
ifnet: use nm_connection_get_setting_connection() to get 'connection' setting
This commit is contained in:
parent
1138f136f8
commit
a0b658281f
1 changed files with 5 additions and 4 deletions
|
|
@ -345,13 +345,14 @@ add_connection (NMSystemConfigInterface *config,
|
|||
NMIfnetConnection *connection = NULL;
|
||||
char *conn_name;
|
||||
gboolean has_flagged_secrets = FALSE;
|
||||
NMSettingConnection *settings = NM_SETTING_CONNECTION (
|
||||
nm_connection_get_setting (source, NM_TYPE_SETTING_CONNECTION));
|
||||
NMSettingConnection *s_con;
|
||||
|
||||
s_con = nm_connection_get_setting_connection (source);
|
||||
g_assert (s_con);
|
||||
|
||||
g_assert (settings);
|
||||
/* If the connection is not available for all users, ignore
|
||||
* it as this plugin only deals with System Connections */
|
||||
if (nm_setting_connection_get_num_permissions (settings))
|
||||
if (nm_setting_connection_get_num_permissions (s_con))
|
||||
return NULL;
|
||||
|
||||
/* If the connection has flagged secrets, ignore
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue