summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-03-29 08:18:59 +0200
committerThomas Haller <thaller@redhat.com>2018-03-29 11:24:32 +0200
commit16262f6a538e35b957d917f574870ec39b25f2c4 (patch)
treef23190b4ba832bb11c2e013ce4a6119302f52ebd
parent18f692f702efc408814a737e3ed49a0809b1b950 (diff)
downloadNetworkManager-16262f6a538e35b957d917f574870ec39b25f2c4.tar.gz
checkpoint: rework getting NM_CHECKPOINT_DEVICES property
-rw-r--r--src/nm-checkpoint.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c
index d85d2d5499..631765c2af 100644
--- a/src/nm-checkpoint.c
+++ b/src/nm-checkpoint.c
@@ -434,16 +434,12 @@ get_property (GObject *object, guint prop_id,
{
NMCheckpoint *self = NM_CHECKPOINT (object);
NMCheckpointPrivate *priv = NM_CHECKPOINT_GET_PRIVATE (self);
- gs_free_slist GSList *devices = NULL;
- GHashTableIter iter;
- NMDevice *device;
switch (prop_id) {
case PROP_DEVICES:
- g_hash_table_iter_init (&iter, priv->devices);
- while (g_hash_table_iter_next (&iter, (gpointer *) &device, NULL))
- devices = g_slist_append (devices, device);
- nm_dbus_utils_g_value_set_object_path_array (value, devices, NULL, NULL);
+ nm_dbus_utils_g_value_set_object_path_from_hash (value,
+ priv->devices,
+ FALSE);
break;
case PROP_CREATED:
g_value_set_int64 (value, priv->created);