[gnome-session/benzea/more-error-logging: 7/7] main: Warn about failures to update the environment




commit b6d98eb76b1d56da2d7202944a748723b58ece4a
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Oct 19 12:20:44 2020 +0200

    main: Warn about failures to update the environment
    
    Closes: #71

 gnome-session/main.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index 53f174e5f..443bc0450 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -529,12 +529,20 @@ main (int argc, char **argv)
                 }
         }
 
-        gsm_util_export_activation_environment (NULL);
+        gsm_util_export_activation_environment (&error);
+        if (error) {
+                g_warning ("Failed to upload environment to DBus: %s", error->message);
+                g_clear_error (&error);
+        }
 
         session_name = opt_session_name;
 
 #ifdef HAVE_SYSTEMD
-        gsm_util_export_user_environment (NULL);
+        gsm_util_export_user_environment (&error);
+        if (error) {
+                g_warning ("Failed to upload environment to systemd: %s", error->message);
+                g_clear_error (&error);
+        }
 #endif
 
 #ifdef ENABLE_SYSTEMD_SESSION


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]