]> git.meshlink.io Git - catta/commitdiff
Compatibility with DBUS 0.60
authorLennart Poettering <lennart@poettering.net>
Thu, 8 Dec 2005 08:42:34 +0000 (08:42 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 8 Dec 2005 08:42:34 +0000 (08:42 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1040 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/dbus-protocol.c

index bd26c8c046beaabe8fa10e4844c91333be223afa..f14e7461ddf5747c98e463eec17c819607bbff93 100644 (file)
@@ -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;