summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-06-08 16:58:22 +0200
committerThomas Haller <thaller@redhat.com>2015-07-02 15:50:03 +0200
commit4a8a0b09180f7f3e9bc63f9cf45e6875dc402b50 (patch)
tree9ee6e0c45529e57ae32ea3f343f03982534b4b53
parent3e4458659b6bbed6441aca0c2a1786bfc33488a9 (diff)
downloadNetworkManager-4a8a0b09180f7f3e9bc63f9cf45e6875dc402b50.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 39af527794..32f2883306 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -799,6 +799,7 @@ nm_config_reload (NMConfig *self, int signal)
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));
@@ -824,7 +825,9 @@ nm_config_reload (NMConfig *self, int signal)
_set_config_data (self, NULL, signal);
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);