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



commit eed7a2946b8665dab9afbe3ad71c3a3097e8cea6
Author: Iain Lane <iainl gnome org>
Date:   Tue Apr 30 09:51:40 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 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index a8747785..09a913c0 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,8 +698,10 @@ 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 {
                 _gdm_display_set_status (self, GDM_DISPLAY_UNMANAGED);


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