[gdm/wip/iainl/xorg-fallback-timer] GdmDisplay: Always output the value of the timer



commit ee19a9749fb2c17f350ae596e3b55f1404adac39
Author: Iain Lane <iainl gnome org>
Date:   Tue Apr 30 09:52:39 2019 +0100

    GdmDisplay: Always output the value of the timer
    
    Currently we don't actually output this if we exit after the timeout has
    expired, making it slightly confusing to debug whether we've hit that
    case.
    
    Related: #483

 daemon/gdm-display.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index a8747785..2f6a7e5b 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -51,6 +51,8 @@
 
 #define GNOME_SESSION_SESSIONS_PATH DATADIR "/gnome-session/sessions"
 
+#define DISPLAY_FAIL_THRESHOLD 3
+
 typedef struct _GdmDisplayPrivate
 {
         GObject               parent;
@@ -696,10 +698,14 @@ gdm_display_unmanage (GdmDisplay *self)
         }
 
         elapsed = g_timer_elapsed (priv->server_timer, NULL);
-        if (elapsed < 3) {
-                g_warning ("GdmDisplay: display lasted %lf seconds", elapsed);
+        g_debug ("GdmDisplay: display lasted %lf seconds", elapsed);
+        if (elapsed < DISPLAY_FAIL_THRESHOLD) {
+                g_warning ("GdmDisplay: Less than the %d second threshold, failing",
+                           DISPLAY_FAIL_THRESHOLD);
                 _gdm_display_set_status (self, GDM_DISPLAY_FAILED);
         } else {
+                g_debug ("GdmDisplay: display lasted more than %d second threshold, unmanaging",
+                         DISPLAY_FAIL_THRESHOLD);
                 _gdm_display_set_status (self, GDM_DISPLAY_UNMANAGED);
         }
 


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