diff options
author | David Zeuthen <davidz@redhat.com> | 2010-04-24 13:47:17 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-04-24 13:47:17 -0400 |
commit | 566f273592a27411ae84de0e3f8af96b9a6e973e (patch) | |
tree | af02fd75dacd1c8f4769437a1694f76964952090 | |
parent | 2ae440523ad43c03205dad0dc897c5c48c3b3e19 (diff) |
Update docs for g_bus_unwatch_proxy()
In particular remove
If the proxy being watched currently exists (e.g. @proxy_appeared_handler
was the last handler to be invoked) then @proxy_vanished_handler will be
invoked before this function returns.
since it is no longer true due to how g_bus_unwatch_name() now works.
-rw-r--r-- | gdbus/gdbusproxywatching.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/gdbus/gdbusproxywatching.c b/gdbus/gdbusproxywatching.c index 901bf0d..24390ff 100644 --- a/gdbus/gdbusproxywatching.c +++ b/gdbus/gdbusproxywatching.c @@ -112,29 +112,6 @@ client_unref (Client *client) } } -static gboolean -schedule_unref_in_idle_cb (gpointer data) -{ - Client *client = data; - client_unref (client); - return FALSE; -} - -static void -schedule_unref_in_idle (Client *client) -{ - GSource *idle_source; - - idle_source = g_idle_source_new (); - g_source_set_priority (idle_source, G_PRIORITY_HIGH); - g_source_set_callback (idle_source, - schedule_unref_in_idle_cb, - client_ref (client), - (GDestroyNotify) client_unref); - g_source_attach (idle_source, client->main_context); - g_source_unref (idle_source); -} - /* ---------------------------------------------------------------------------------------------------- */ static void @@ -394,11 +371,7 @@ g_bus_watch_proxy (GBusType bus_type, * @watcher_id: An identifier obtained from g_bus_watch_proxy() * * Stops watching proxy. - * - * If the proxy being watched currently exists - * (e.g. @proxy_appeared_handler was the last handler to be invoked), - * then @proxy_vanished_handler will be invoked before this function returns. - **/ + */ void g_bus_unwatch_proxy (guint watcher_id) { @@ -420,13 +393,10 @@ g_bus_unwatch_proxy (guint watcher_id) out: G_UNLOCK (lock); - /* TODO: think about this: this will trigger callbacks from the name_watcher object being used */ if (client != NULL) { - /* this will trigger on_name_vanished() */ g_bus_unwatch_name (client->name_watcher_id); client->name_watcher_id = 0; - /* this will happen *after* on_name_vanished() */ - schedule_unref_in_idle (client); + client_unref (client); } } |