[next] telepathy-idle: idle-connection: make sure to always reset force_disconnect_id

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri Feb 14 13:59:20 CET 2014


Module: telepathy-idle
Branch: next
Commit: 12211654baa75db13a05b5c2b3293d1378fcf7a2
URL:    http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=12211654baa75db13a05b5c2b3293d1378fcf7a2

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Fri Feb 14 12:12:54 2014 +0100

idle-connection: make sure to always reset force_disconnect_id

Recent GLib raises a critical when trying to remove an invalid source.

---

 src/idle-connection.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/idle-connection.c b/src/idle-connection.c
index 6f61e6b..9ee8840 100644
--- a/src/idle-connection.c
+++ b/src/idle-connection.c
@@ -587,6 +587,7 @@ static gboolean _finish_shutdown_idle_func(gpointer data) {
 	IdleConnectionPrivate *priv = self->priv;
 	if (priv->force_disconnect_id != 0) {
 		g_source_remove(priv->force_disconnect_id);
+		priv->force_disconnect_id = 0;
 	}
 
 	tp_base_connection_finish_shutdown(conn);
@@ -602,6 +603,7 @@ _force_disconnect (gpointer data)
 
 	IDLE_DEBUG("gave up waiting, forcibly disconnecting");
 	idle_server_connection_force_disconnect(priv->conn);
+	priv->force_disconnect_id = 0;
 	return FALSE;
 }
 



More information about the telepathy-commits mailing list