5611164
From 8f04d4db50f29420022f11a48b5ecf132058c2f3 Mon Sep 17 00:00:00 2001
5611164
From: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
5611164
Date: Fri, 14 Feb 2014 12:12:54 +0100
5611164
Subject: [PATCH] idle-connection: make sure to always reset
5611164
 force_disconnect_id
5611164
5611164
Recent GLib raises a critical when trying to remove an invalid source.
5611164
---
5611164
 src/idle-connection.c | 2 ++
5611164
 1 file changed, 2 insertions(+)
5611164
5611164
diff --git a/src/idle-connection.c b/src/idle-connection.c
5611164
index 6ab5fea..8614d52 100644
5611164
--- a/src/idle-connection.c
5611164
+++ b/src/idle-connection.c
5611164
@@ -585,6 +585,7 @@ static gboolean _finish_shutdown_idle_func(gpointer data) {
5611164
 	IdleConnectionPrivate *priv = self->priv;
5611164
 	if (priv->force_disconnect_id != 0) {
5611164
 		g_source_remove(priv->force_disconnect_id);
5611164
+		priv->force_disconnect_id = 0;
5611164
 	}
5611164
 
5611164
 	tp_base_connection_finish_shutdown(conn);
5611164
@@ -600,6 +601,7 @@ _force_disconnect (gpointer data)
5611164
 
5611164
 	IDLE_DEBUG("gave up waiting, forcibly disconnecting");
5611164
 	idle_server_connection_force_disconnect(priv->conn);
5611164
+	priv->force_disconnect_id = 0;
5611164
 	return FALSE;
5611164
 }
5611164
 
5611164
-- 
5611164
GitLab
5611164