dbus/bus driver.c,1.53,1.54

Jon Trowbridge trow at freedesktop.org
Thu Aug 26 10:26:08 PDT 2004


Update of /cvs/dbus/dbus/bus
In directory gabe:/tmp/cvs-serv11751/bus

Modified Files:
	driver.c 
Log Message:
2004-08-26  Jon Trowbridge  <trow at ximian.com>
 
        * bus/driver.c (bus_driver_handle_service_exists): Respond with
        TRUE if we are inquiring about the existence of the built-in
        org.freedesktop.DBus service.



Index: driver.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/driver.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- driver.c	25 Aug 2004 08:03:12 -0000	1.53
+++ driver.c	26 Aug 2004 17:26:06 -0000	1.54
@@ -511,6 +511,7 @@
   DBusMessage *reply;
   DBusString service_name;
   BusService *service;
+  dbus_bool_t service_exists;
   char *name;
   dbus_bool_t retval;
   BusRegistry *registry;
@@ -525,10 +526,18 @@
     return FALSE;
 
   retval = FALSE;
+
+  if (strcmp (name, DBUS_SERVICE_ORG_FREEDESKTOP_DBUS) == 0)
+    {
+      service_exists = TRUE;
+    }
+  else
+    {
+      _dbus_string_init_const (&service_name, name);
+      service = bus_registry_lookup (registry, &service_name);
+      service_exists = service != NULL;
+    }
   
-  _dbus_string_init_const (&service_name, name);
-  service = bus_registry_lookup (registry, &service_name);
- 
   reply = dbus_message_new_method_return (message);
   if (reply == NULL)
     {
@@ -537,7 +546,7 @@
     }
 
   if (!dbus_message_append_args (reply,
-                                 DBUS_TYPE_BOOLEAN, service != NULL,
+                                 DBUS_TYPE_BOOLEAN, service_exists,
                                  0))
     {
       BUS_SET_OOM (error);



More information about the dbus-commit mailing list