mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 15:10:22 +01:00
settings/keyfile: log reason why re-read connection cannot be normalized
It's a bug either way, but let's log what exactly went wrong.
This commit is contained in:
parent
a265892385
commit
1c2c7d3cb7
1 changed files with 3 additions and 2 deletions
|
|
@ -346,6 +346,7 @@ _internal_write_connection (NMConnection *connection,
|
|||
|
||||
if (out_reread || out_reread_same) {
|
||||
gs_unref_object NMConnection *reread = NULL;
|
||||
gs_free_error GError *reread_error = NULL;
|
||||
gboolean reread_same = FALSE;
|
||||
|
||||
reread = nms_keyfile_reader_from_keyfile (kf_file, path, NULL, profile_dir, FALSE, NULL);
|
||||
|
|
@ -353,7 +354,8 @@ _internal_write_connection (NMConnection *connection,
|
|||
nm_assert (NM_IS_CONNECTION (reread));
|
||||
|
||||
if ( reread
|
||||
&& !nm_connection_normalize (reread, NULL, NULL, NULL)) {
|
||||
&& !nm_connection_normalize (reread, NULL, NULL, &reread_error)) {
|
||||
nm_log_err (LOGD_SETTINGS, "BUG: failure to normalize profile that we just wrote to disk: %s", reread_error->message);
|
||||
nm_assert_not_reached ();
|
||||
g_clear_object (&reread);
|
||||
}
|
||||
|
|
@ -448,4 +450,3 @@ nms_keyfile_writer_test_connection (NMConnection *connection,
|
|||
out_reread_same,
|
||||
error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue