summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-07-28 00:05:00 +0200
committerThomas Haller <thaller@redhat.com>2014-07-28 00:10:06 +0200
commit0e5f0a1b611d81f4e04d1466ee1512d797437b38 (patch)
treec2fc10e6dceef2350f4f9c9263d65d3c25b3101b
parenta41d5d2d7c2b3bd748aa072d4ebe451c3d579fb8 (diff)
downloadNetworkManager-0e5f0a1b611d81f4e04d1466ee1512d797437b38.tar.gz
fixup! libnm-util: normalize NMSettingConnection:type property
-rw-r--r--libnm-util/nm-connection.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index 8b14237e52..99cbdf56c5 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -645,6 +645,7 @@ _normalize_connection_type (NMConnection *self)
NMSettingConnection *s_con = nm_connection_get_setting_connection (self);
NMSetting *s_base = NULL;
const char *type;
+ GSList *all_settings;
type = nm_setting_connection_get_connection_type (s_con);
@@ -658,14 +659,7 @@ _normalize_connection_type (NMConnection *self)
return TRUE;
}
} else {
- NMConnectionPrivate *priv = NM_CONNECTION_GET_PRIVATE (self);
- GSList *all_settings = NULL;
- NMSetting *setting;
- GHashTableIter h_iter;
-
- g_hash_table_iter_init (&h_iter, priv->settings);
- while (g_hash_table_iter_next (&h_iter, NULL, (void **) &setting))
- all_settings = g_slist_prepend (all_settings, setting);
+ all_settings = nm_intern_utils_hash_values_to_slist (NM_CONNECTION_GET_PRIVATE (self)->settings);
s_base = _nm_setting_find_in_list_base_type (all_settings);
g_return_val_if_fail (s_base, FALSE);