[glib/gdbus-daemon] gdbusdaemon: Fix NameHasOwner wrt unique names



commit befcee6f0b36c8ec5aa0786413d1b970e90c990c
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Apr 17 10:44:21 2012 +0200

    gdbusdaemon: Fix NameHasOwner wrt unique names
    
    Each client also owns its unique name

 gio/gdbusdaemon.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusdaemon.c b/gio/gdbusdaemon.c
index 3e681ef..f22c0bd 100644
--- a/gio/gdbusdaemon.c
+++ b/gio/gdbusdaemon.c
@@ -1081,11 +1081,13 @@ handle_name_has_owner (_GFreedesktopDBus *object,
 {
   GDBusDaemon *daemon = G_DBUS_DAEMON (object);
   Name *name;
+  Client *client;
 
   name = name_lookup (daemon, arg_name);
+  client = g_hash_table_lookup (daemon->clients, arg_name);
 
   _g_freedesktop_dbus_complete_name_has_owner (object, invocation,
-					       name != NULL);
+					       name != NULL || client != NULL);
   return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]