aboutsummaryrefslogtreecommitdiff
path: root/src/bus-watch-namespace.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-12-06 10:13:57 -0600
committerTed Gould <ted@gould.cx>2014-12-06 10:13:57 -0600
commit4ab5d1931bc0e8925f2fa32b42ea7c161a7bfc10 (patch)
tree2d1b7f282008d70e84e1e0b9fdfb8a4080c3572b /src/bus-watch-namespace.c
parent2f0aba374502b7ea660fce49f70e3ea972725685 (diff)
downloadayatana-indicator-sound-4ab5d1931bc0e8925f2fa32b42ea7c161a7bfc10.tar.gz
ayatana-indicator-sound-4ab5d1931bc0e8925f2fa32b42ea7c161a7bfc10.tar.bz2
ayatana-indicator-sound-4ab5d1931bc0e8925f2fa32b42ea7c161a7bfc10.zip
Disconnect the right function from the 'closed' signal'
Diffstat (limited to 'src/bus-watch-namespace.c')
-rw-r--r--src/bus-watch-namespace.c9
1 files changed, 8 insertions, 1 deletions
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);
}