[gdm/multi-stack: 30/46] Prevent start session signal handler from getting called multiple times
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/multi-stack: 30/46] Prevent start session signal handler from getting called multiple times
- Date: Fri, 26 Mar 2010 13:36:07 +0000 (UTC)
commit 40fec9504c0b0531e93bedfd6465b2b4aef2285c
Author: Ray Strode <rstrode redhat com>
Date: Wed Oct 28 11:13:10 2009 -0400
Prevent start session signal handler from getting called multiple times
It was causing a double free.
gui/simple-greeter/gdm-greeter-login-window.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index d0d7363..5bd3019 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -906,8 +906,17 @@ on_ready_to_start_session (GdmGreeterLoginWindow *login_window,
GParamSpec *param_spec,
char *service_name)
{
+ if (!login_window->priv->is_interactive) {
+ return;
+ }
+
gdm_greeter_login_window_start_session_when_ready (login_window, service_name);
g_free (service_name);
+
+ if (login_window->priv->start_session_handler_id > 0) {
+ g_signal_handler_disconnect (login_window, login_window->priv->start_session_handler_id);
+ login_window->priv->start_session_handler_id = 0;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]