diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-09-07 17:47:19 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-09-26 15:10:39 +0200 |
commit | c76e2188772525c00873b9a2796121c7044cc899 (patch) | |
tree | a20f1070353ddd976fce7d3faf86b49d6c2d1468 /src/nm-checkpoint.c | |
parent | 637e31bc1fea0f49608f60a6bc799d613e25a845 (diff) | |
download | NetworkManager-c76e2188772525c00873b9a2796121c7044cc899.tar.gz |
checkpoint: use UUID instead of path to match connections
The path can change, while the UUID should univocally identify the
connection.
Diffstat (limited to 'src/nm-checkpoint.c')
-rw-r--r-- | src/nm-checkpoint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c index aebc25649a..22360250bb 100644 --- a/src/nm-checkpoint.c +++ b/src/nm-checkpoint.c @@ -125,7 +125,7 @@ nm_checkpoint_rollback (NMCheckpoint *self) while (g_hash_table_iter_next (&iter, (gpointer *) &device, (gpointer *) &dev_checkpoint)) { gs_unref_object NMAuthSubject *subject = NULL; guint32 result = NM_ROLLBACK_RESULT_OK; - const char *con_path; + const char *con_uuid; _LOGD ("rollback: restoring device %s (state %d, realized %d, explicitly unmanaged %d)", nm_device_get_iface (device), @@ -173,14 +173,14 @@ activate: /* The device had an active connection, check if the * connection still exists * */ - con_path = nm_connection_get_path (dev_checkpoint->connection); - connection = nm_settings_get_connection_by_path (nm_settings_get(), con_path); + con_uuid = nm_connection_get_uuid (dev_checkpoint->connection); + connection = nm_settings_get_connection_by_uuid (nm_settings_get (), con_uuid); if (connection) { /* If the connection is still there, restore its content * and save it * */ - _LOGD ("rollback: connection %s still exists", con_path); + _LOGD ("rollback: connection %s still exists", con_uuid); nm_connection_replace_settings_from_connection (NM_CONNECTION (connection), dev_checkpoint->connection); @@ -190,7 +190,7 @@ activate: NULL); } else { /* The connection was deleted, recreate it */ - _LOGD ("rollback: adding connection %s again", con_path); + _LOGD ("rollback: adding connection %s again", con_uuid); connection = nm_settings_add_connection (nm_settings_get (), dev_checkpoint->connection, |