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;
}
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);
dbus_error_free(&error);
if (server->bus) {
+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 62)
+ dbus_connection_close(server->bus);
+#else
dbus_connection_disconnect(server->bus);
+#endif
dbus_connection_unref(server->bus);
server->bus = NULL;
}
assert(server->n_clients == 0);
if (server->bus) {
+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 62)
+ dbus_connection_close(server->bus);
+#else
dbus_connection_disconnect(server->bus);
+#endif
dbus_connection_unref(server->bus);
server->bus = NULL;
}
fail:
if (server->bus) {
+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 62)
+ dbus_connection_close(server->bus);
+#else
dbus_connection_disconnect(server->bus);
+#endif
dbus_connection_unref(server->bus);
}