]> git.meshlink.io Git - catta/commitdiff
* Fix avhai builds with newer (>= 0.62) dbus that deprecated
authorTrent Lloyd <lathiat@bur.st>
Tue, 18 Jul 2006 22:25:22 +0000 (22:25 +0000)
committerTrent Lloyd <lathiat@bur.st>
Tue, 18 Jul 2006 22:25:22 +0000 (22:25 +0000)
dbus_connection_disconnect

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1238 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-client/client.c
avahi-daemon/dbus-protocol.c

index 90686fc6fabc8d635db35e9b700ce8909aaf0581..0913847b7abe6b6f1c5fa9a7efb6f8cf6e1f8759 100644 (file)
@@ -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);
index 19e956b6c214145900abf78a759c6885efe619ab..55fe3e438ab6b1387b3110ce389493bb9a99d2f7 100644 (file)
@@ -1115,7 +1115,11 @@ fail:
         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;
     }
@@ -1132,7 +1136,11 @@ static void dbus_disconnect(void) {
     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;
     }
@@ -1167,7 +1175,11 @@ int dbus_protocol_setup(const AvahiPoll *poll_api, int _disable_user_service_pub
 
 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);
     }