[gvfs/gdbus] gdbus: Suppose that g_bus_watch_name() never returns zero
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gdbus] gdbus: Suppose that g_bus_watch_name() never returns zero
- Date: Tue, 31 May 2011 13:38:50 +0000 (UTC)
commit 2f2df264577aec52cbf160f7a75a4ad9658986ca
Author: Tomas Bzatek <tbzatek redhat com>
Date: Fri May 27 17:44:49 2011 +0200
gdbus: Suppose that g_bus_watch_name() never returns zero
g_bus_watch_name() never returns zero so we can use it to distinguish
if watching has been started or not.
monitor/proxy/gvfsproxyvolumemonitordaemon.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/monitor/proxy/gvfsproxyvolumemonitordaemon.c b/monitor/proxy/gvfsproxyvolumemonitordaemon.c
index 4337520..1a78eb4 100644
--- a/monitor/proxy/gvfsproxyvolumemonitordaemon.c
+++ b/monitor/proxy/gvfsproxyvolumemonitordaemon.c
@@ -489,7 +489,7 @@ on_name_owner_vanished (GDBusConnection *connection,
}
else
{
- g_bus_unwatch_name (name_watcher_id - 1);
+ g_bus_unwatch_name (name_watcher_id);
}
g_hash_table_remove (unique_names_being_watched, name);
@@ -515,7 +515,7 @@ ensure_name_owner_changed_for_unique_name (GDBusMethodInvocation *invocation)
on_name_owner_vanished,
NULL,
NULL);
- g_hash_table_insert (unique_names_being_watched, g_strdup (unique_name), (gpointer) (name_watcher_id + 1));
+ g_hash_table_insert (unique_names_being_watched, g_strdup (unique_name), (gpointer) name_watcher_id);
out:
G_UNLOCK (unique_names_being_watched_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]