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



commit 2803515547720b7b4abd6c932c979b2db869a63e
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]