[gnome-power-manager] If we loose the DBus name, exit



commit 95f83e34b3d123847a65d3f2a921c1c09c030b7d
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 1 17:46:29 2011 +0100

    If we loose the DBus name, exit
    
    This prevents two instances of gnome-power-manager being run by gdm, which
    itself causes an issue if the user closes the laptop lid, and both processes
    tell upower to suspend.
    
    One call to upower succeeds, and one fails, and the user is left with a
    erroneous 'Your computer failed to suspend' message on resume.
    
    In 3.2, gnome-power-manager is being moved to gnome-settings-daemon, and so the
    problem goes away for good. Yay.

 src/gpm-manager.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 0c79aa6..aa9f5cb 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -2262,6 +2262,7 @@ gpm_manager_name_lost_cb (GDBusConnection *connection,
 			  gpointer user_data)
 {
 	g_warning ("name lost %s", name);
+	exit (1);
 }
 
 /**



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