Commit d4ad08a1 authored by Benjamin Berg's avatar Benjamin Berg
Browse files

main: Also clear error when running under GDM

Commit 0349a77a ("main: Lower fallback warning when running in GDM")
removed error logging when running under GDM. However, the error was not
cleared afterwards, leaking it to later operations and causing other
issues.

Closes: #105
parent 26f0f4fc
......@@ -543,10 +543,9 @@ main (int argc, char **argv)
#ifdef HAVE_SYSTEMD
gsm_util_export_user_environment (&error);
if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
if (error && !g_getenv ("RUNNING_UNDER_GDM"))
g_warning ("Failed to upload environment to systemd: %s", error->message);
g_clear_error (&error);
}
g_clear_error (&error);
#endif
#ifdef ENABLE_SYSTEMD_SESSION
......@@ -567,10 +566,9 @@ main (int argc, char **argv)
* in a previous session
*/
gsm_util_systemd_reset_failed (&error);
if (error && !g_getenv ("RUNNING_UNDER_GDM")) {
if (error && !g_getenv ("RUNNING_UNDER_GDM"))
g_warning ("Failed to reset failed state of units: %s", error->message);
g_clear_error (&error);
}
g_clear_error (&error);
/* We don't escape the name (i.e. we leave any '-' intact). */
gnome_session_target = g_strdup_printf ("gnome-session-%s@%s.target", session_type, session_name);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment