diff options
author | Brian Cameron <brian.cameron@oracle.com> | 2012-06-25 12:12:03 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2012-06-25 12:16:48 -0400 |
commit | d4fafda602937fdb13d28a710eab997ff7262251 (patch) | |
tree | feb8e147ace830ed6828c12ce27a07d6942f983d | |
parent | e4a718fefd620fb3d80f0fba6f7faecd435ea89d (diff) | |
download | gdm-d4fafda602937fdb13d28a710eab997ff7262251.tar.gz |
daemon: reload config on SIGHUP
-rw-r--r-- | common/gdm-settings-direct.c | 6 | ||||
-rw-r--r-- | daemon/main.c | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/common/gdm-settings-direct.c b/common/gdm-settings-direct.c index b1b66fbe..fb1f1f3a 100644 --- a/common/gdm-settings-direct.c +++ b/common/gdm-settings-direct.c @@ -232,7 +232,11 @@ gdm_settings_direct_init (GdmSettings *settings, g_return_val_if_fail (file != NULL, FALSE); g_return_val_if_fail (root != NULL, FALSE); - g_assert (schemas == NULL); + g_debug ("Settings Direct Init"); + if (schemas != NULL) { + g_hash_table_unref (schemas); + schemas = NULL; + } if (! gdm_settings_parse_schemas (file, root, &list)) { g_warning ("Unable to parse schemas"); diff --git a/daemon/main.c b/daemon/main.c index 2ffb779c..cba7cc29 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -471,9 +471,17 @@ signal_cb (int signo, case SIGHUP: g_debug ("Got HUP signal"); - /* FIXME: - * Reread config stuff like system config files, VPN service files, etc + /* Reread config stuff like system config files, VPN service + * files, etc */ + g_object_unref (settings); + settings = gdm_settings_new (); + if (settings != NULL) { + if (! gdm_settings_direct_init (settings, GDMCONFDIR "/gdm.schemas", "/")) { + g_warning ("Unable to initialize settings"); + } + } + ret = TRUE; break; |