diff options
author | Brian Cameron <Brian.Cameron@sun.com> | 2009-11-09 14:14:51 -0600 |
---|---|---|
committer | Brian Cameron <Brian.Cameron@sun.com> | 2009-11-09 14:14:51 -0600 |
commit | f5b2931ffab26995970ebbbe0af2fafd985753a1 (patch) | |
tree | 1325364e70daf55c46a5b3c60f6ad61df948516f /daemon/simple-slave-main.c | |
parent | 63ce2462db5d6b1cce8f420046b2bcf079de3f2f (diff) | |
download | gdm-f5b2931ffab26995970ebbbe0af2fafd985753a1.tar.gz |
Fix GDM debugging so that it works. Now debugging is enabled via the
debug/Enable key in the custom.conf file. See bug #596831.
Diffstat (limited to 'daemon/simple-slave-main.c')
-rw-r--r-- | daemon/simple-slave-main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/daemon/simple-slave-main.c b/daemon/simple-slave-main.c index b8926d8b..629f004b 100644 --- a/daemon/simple-slave-main.c +++ b/daemon/simple-slave-main.c @@ -46,7 +46,9 @@ #include "gdm-settings.h" #include "gdm-settings-direct.h" -#include "gdm-settings-client.h" +#include "gdm-settings.h" +#include "gdm-settings-direct.h" +#include "gdm-settings-keys.h" static GdmSettings *settings = NULL; static int gdm_return_code = 0; @@ -154,14 +156,17 @@ on_slave_stopped (GdmSlave *slave, } static gboolean -is_debug_set (gboolean arg) +is_debug_set (void) { + gboolean debug = FALSE; + /* enable debugging for unstable builds */ if (gdm_is_version_unstable ()) { return TRUE; } - return arg; + gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug); + return debug; } int @@ -173,10 +178,8 @@ main (int argc, DBusGConnection *connection; GdmSlave *slave; static char *display_id = NULL; - static gboolean debug = FALSE; GdmSignalHandler *signal_handler; static GOptionEntry entries [] = { - { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL }, { "display-id", 0, 0, G_OPTION_ARG_STRING, &display_id, N_("Display ID"), N_("ID") }, { NULL } }; @@ -216,7 +219,7 @@ main (int argc, goto out; } - gdm_log_set_debug (is_debug_set (debug)); + gdm_log_set_debug (is_debug_set ()); if (display_id == NULL) { g_critical ("No display ID set"); |