summaryrefslogtreecommitdiffstats
path: root/avahi-client/client.c
diff options
context:
space:
mode:
authorTrent Lloyd <lathiat@bur.st>2006-07-18 22:25:22 +0000
committerTrent Lloyd <lathiat@bur.st>2006-07-18 22:25:22 +0000
commitaf5704d57bc23aaa43bdd0cbee79f5cfeccde4b5 (patch)
tree5c6e08a5fd53e3dbf7839ab4763e58b9820c4f52 /avahi-client/client.c
parent495a92b93160e3ac1864341ed46d6e81b02f35ea (diff)
* Fix avhai builds with newer (>= 0.62) dbus that deprecated
dbus_connection_disconnect git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1238 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-client/client.c')
-rw-r--r--avahi-client/client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/avahi-client/client.c b/avahi-client/client.c
index 90686fc..0913847 100644
--- a/avahi-client/client.c
+++ b/avahi-client/client.c
@@ -67,7 +67,11 @@ static void client_set_state (AvahiClient *client, AvahiServerState state) {
switch (client->state) {
case AVAHI_CLIENT_FAILURE:
if (client->bus) {
+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 62)
+ dbus_connection_close(client->bus);
+#else
dbus_connection_disconnect(client->bus);
+#endif
dbus_connection_unref(client->bus);
client->bus = NULL;
}
@@ -598,7 +602,11 @@ void avahi_client_free(AvahiClient *client) {
if (client->bus)
/* Disconnect in advance, so that the free() functions won't
* issue needless server calls */
+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 62)
+ dbus_connection_close(client->bus);
+#else
dbus_connection_disconnect(client->bus);
+#endif
while (client->groups)
avahi_entry_group_free(client->groups);