From: Lennart Poettering Date: Thu, 8 Dec 2005 08:42:34 +0000 (+0000) Subject: Compatibility with DBUS 0.60 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=e74831d206286b493c62a7f58a96e84a4027a367;p=catta Compatibility with DBUS 0.60 git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1040 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c index bd26c8c..f14e746 100644 --- a/avahi-daemon/dbus-protocol.c +++ b/avahi-daemon/dbus-protocol.c @@ -156,7 +156,6 @@ static Client *client_get(const char *name, int create) { return client; } - static DBusHandlerResult msg_signal_filter_impl(AVAHI_GCC_UNUSED DBusConnection *c, DBusMessage *m, AVAHI_GCC_UNUSED void *userdata) { DBusError error; @@ -1029,7 +1028,15 @@ int dbus_protocol_setup(const AvahiPoll *poll_api, int _disable_user_service_pub goto fail; } - if (dbus_bus_request_name(server->bus, AVAHI_DBUS_NAME, DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, &error) != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { + if (dbus_bus_request_name( + server->bus, + AVAHI_DBUS_NAME, +#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 60) + DBUS_NAME_FLAG_DO_NOT_QUEUE, +#else + DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, +#endif + &error) != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { if (dbus_error_is_set(&error)) { avahi_log_error("dbus_bus_request_name(): %s", error.message); goto fail;