summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-06-08 16:58:22 +0200
committerThomas Haller <thaller@redhat.com>2015-06-13 12:26:38 +0200
commit0a293224f500caf36cf534b5ddd39183201ca67f (patch)
treea0c3208dc988dcd803e4facadb74982b9eb39095
parenta86efa4def8fbbf984f5d6f8e4ec72a4adac2000 (diff)
downloadNetworkManager-0a293224f500caf36cf534b5ddd39183201ca67f.tar.gz
config: reload also no-auto-default state
The content of the no-auto-default state file is part of NMConfig. During a reload, also reload that. This way, a user could edit the no-auto-default file and it would be properly reloaded.
-rw-r--r--src/nm-config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nm-config.c b/src/nm-config.c
index c377aee989..01938d1108 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -755,6 +755,7 @@ nm_config_reload (NMConfig *self)
NMConfigData *new_data = NULL;
char *config_main_file = NULL;
char *config_description = NULL;
+ gs_strfreev char **no_auto_default = NULL;
g_return_if_fail (NM_IS_CONFIG (self));
@@ -775,7 +776,9 @@ nm_config_reload (NMConfig *self)
g_clear_error (&error);
return;
}
- new_data = nm_config_data_new (config_main_file, config_description, nm_config_data_get_no_auto_default (priv->config_data), keyfile);
+ no_auto_default = no_auto_default_from_file (priv->no_auto_default_file);
+
+ new_data = nm_config_data_new (config_main_file, config_description, (const char *const*) no_auto_default, keyfile);
g_free (config_main_file);
g_free (config_description);
g_key_file_unref (keyfile);