diff options
Diffstat (limited to 'bus')
-rw-r--r-- | bus/driver.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bus/driver.c b/bus/driver.c index 9923f121..90659cd2 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -511,6 +511,7 @@ bus_driver_handle_service_exists (DBusConnection *connection, DBusMessage *reply; DBusString service_name; BusService *service; + dbus_bool_t service_exists; char *name; dbus_bool_t retval; BusRegistry *registry; @@ -525,10 +526,18 @@ bus_driver_handle_service_exists (DBusConnection *connection, 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 @@ bus_driver_handle_service_exists (DBusConnection *connection, } if (!dbus_message_append_args (reply, - DBUS_TYPE_BOOLEAN, service != NULL, + DBUS_TYPE_BOOLEAN, service_exists, 0)) { BUS_SET_OOM (error); |