mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 16:30:12 +01:00
libnm: avoid cloning list of settings in nm_connection_to_dbus_full()
(cherry picked from commit d829849a7b)
This commit is contained in:
parent
07ba3cb0d7
commit
eb10539b80
1 changed files with 11 additions and 8 deletions
|
|
@ -2453,19 +2453,22 @@ nm_connection_to_dbus_full(NMConnection * connection,
|
|||
NMConnectionSerializationFlags flags,
|
||||
const NMConnectionSerializationOptions *options)
|
||||
{
|
||||
GVariantBuilder builder;
|
||||
gboolean any = FALSE;
|
||||
gs_free NMSetting **settings = NULL;
|
||||
guint settings_len = 0;
|
||||
guint i;
|
||||
NMConnectionPrivate *priv;
|
||||
GVariantBuilder builder;
|
||||
gboolean any = FALSE;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail(NM_IS_CONNECTION(connection), NULL);
|
||||
|
||||
settings = nm_connection_get_settings(connection, &settings_len);
|
||||
for (i = 0; i < settings_len; i++) {
|
||||
NMSetting *setting = settings[i];
|
||||
priv = NM_CONNECTION_GET_PRIVATE(connection);
|
||||
|
||||
for (i = 0; i < (int) _NM_META_SETTING_TYPE_NUM; i++) {
|
||||
NMSetting *setting = priv->settings[nm_meta_setting_types_by_priority[i]];
|
||||
GVariant * setting_dict;
|
||||
|
||||
if (!setting)
|
||||
continue;
|
||||
|
||||
setting_dict = _nm_setting_to_dbus(setting, connection, flags, options);
|
||||
if (!setting_dict)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue