From bee9b7e327870b740ef645017bc1e8b3ef0daa41 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 8 Jun 2015 16:58:22 +0200 Subject: [PATCH] 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. (cherry picked from commit 4a8a0b09180f7f3e9bc63f9cf45e6875dc402b50) --- src/nm-config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nm-config.c b/src/nm-config.c index 859d637550..3733a43a16 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);