[gnome-session] main: support GNOME_SESSION_DEBUG=0 and GNOME_SESSION_DEBUG=1
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] main: support GNOME_SESSION_DEBUG=0 and GNOME_SESSION_DEBUG=1
- Date: Thu, 18 Dec 2014 18:54:27 +0000 (UTC)
commit 2138d5d9c5fb1728ade9ef182ff5d1df4bb5efa3
Author: Ray Strode <rstrode redhat com>
Date: Wed Dec 17 15:42:03 2014 -0500
main: support GNOME_SESSION_DEBUG=0 and GNOME_SESSION_DEBUG=1
rpmatch curiously doesn't grok 0 and 1 as no and yes. This commit
throws atoi into the mix to cover those cases.
gnome-session/main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index ab47e67..e68b6f4 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -233,6 +233,7 @@ main (int argc, char **argv)
GError *error = NULL;
static char **override_autostart_dirs = NULL;
static char *opt_session_name = NULL;
+ const char *debug_string = NULL;
gboolean gl_failed = FALSE;
guint name_owner_id;
GOptionContext *options;
@@ -257,8 +258,9 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- if (g_getenv ("GNOME_SESSION_DEBUG") != NULL) {
- debug = rpmatch (g_getenv ("GNOME_SESSION_DEBUG"));
+ debug_string = g_getenv ("GNOME_SESSION_DEBUG");
+ if (debug_string != NULL) {
+ debug = rpmatch (debug_string) == TRUE || atoi (debug_string) == 1;
}
error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]