From 96d613ee9a4850753e8f93113ab28ed3045f73f3 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Mon, 28 Jan 2008 17:30:47 -0500 Subject: fixes for solaris Fixes two bugs I found in the code. The first is that we need some NULL protection around the g_strdup_printf where we build CK_SESSION_X11_DISPLAY to avoid a crash. Second, I noticed a bug in the ck_unix_pid_get_hash function where we weren't parsing the data right and causing the hash to not get set properly. --- src/ck-session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ck-session.c') diff --git a/src/ck-session.c b/src/ck-session.c index a700786..b950184 100644 --- a/src/ck-session.c +++ b/src/ck-session.c @@ -1230,7 +1230,8 @@ ck_session_run_programs (CkSession *session, if (session->priv->x11_display_device != NULL && strlen (session->priv->x11_display_device) > 0) { extra_env[n++] = g_strdup_printf ("CK_SESSION_X11_DISPLAY_DEVICE=%s", session->priv->x11_display_device); } - extra_env[n++] = g_strdup_printf ("CK_SESSION_X11_DISPLAY=%s", session->priv->x11_display); + extra_env[n++] = g_strdup_printf ("CK_SESSION_X11_DISPLAY=%s", + session->priv->x11_display ? session->priv->x11_display : ""); if (session->priv->remote_host_name != NULL && strlen (session->priv->remote_host_name) > 0) { extra_env[n++] = g_strdup_printf ("CK_SESSION_REMOTE_HOST_NAME=%s", session->priv->remote_host_name); } -- cgit