[gnome-session] main: Fix g_critical() on login
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] main: Fix g_critical() on login
- Date: Wed, 21 Nov 2012 22:08:16 +0000 (UTC)
commit 854edad853880b285309259a79532bef5202514e
Author: Colin Walters <walters verbum org>
Date: Tue Nov 20 19:43:53 2012 -0500
main: Fix g_critical() on login
Commit
http://git.gnome.org/browse/gnome-session/commit/?id=34c380508516f8a2f81b68d189b24fedb05870ea
caused us to emit a g_critical because we were passing NULL for the
user data, when the callback expected a GsmManager. Fixing this
requires passing the user data later.
https://bugzilla.gnome.org/show_bug.cgi?id=688774
gnome-session/main.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index dd8dd61..44d6ee5 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -157,11 +157,6 @@ acquire_name (void)
return FALSE;
}
- g_signal_connect_swapped (bus_proxy,
- "destroy",
- G_CALLBACK (shutdown_cb),
- NULL);
-
if (! acquire_name_on_proxy (bus_proxy, GSM_DBUS_NAME) ) {
gsm_util_init_error (TRUE,
"%s",
@@ -332,6 +327,11 @@ main (int argc, char **argv)
manager = gsm_manager_new (client_store, failsafe);
+ g_signal_connect_swapped (bus_proxy,
+ "destroy",
+ G_CALLBACK (shutdown_cb),
+ manager);
+
g_unix_signal_add (SIGTERM, term_or_int_signal_cb, manager);
g_unix_signal_add (SIGINT, term_or_int_signal_cb, manager);
g_unix_signal_add (SIGUSR1, sigusr1_cb, manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]