From 4ab5d1931bc0e8925f2fa32b42ea7c161a7bfc10 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 6 Dec 2014 10:13:57 -0600 Subject: Disconnect the right function from the 'closed' signal' --- src/bus-watch-namespace.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bus-watch-namespace.c b/src/bus-watch-namespace.c index ad4e7ad..66ad2b2 100644 --- a/src/bus-watch-namespace.c +++ b/src/bus-watch-namespace.c @@ -41,9 +41,16 @@ typedef struct gchar *name; } GetNameOwnerData; +/* Global Variables */ static guint namespace_watcher_next_id; static GHashTable *namespace_watcher_watchers; +/* Prototypes */ +static void connection_closed (GDBusConnection *connection, + gboolean remote_peer_vanished, + GError *error, + gpointer user_data); + static void namespace_watcher_stop (gpointer data) { @@ -70,7 +77,7 @@ namespace_watcher_stop (gpointer data) if (watcher->connection) { - g_signal_handlers_disconnect_by_func (watcher->connection, namespace_watcher_stop, watcher); + g_signal_handlers_disconnect_by_func (watcher->connection, connection_closed, watcher); g_object_unref (watcher->connection); } -- cgit v1.2.3