]> git.meshlink.io Git - catta/blobdiff - examples/glib-integration.c
* Rename AVAHI_ERR_NOT_CONNECTED to AVAHI_ERR_DISCONNECTED
[catta] / examples / glib-integration.c
index bf6eacf6139ca77da04548f79135d7d00205eb86..f1830d86134d77f10a911680a0588c82c753ebd0 100644 (file)
@@ -60,10 +60,10 @@ avahi_client_callback (AVAHI_GCC_UNUSED AvahiClient *client, AvahiClientState st
 
     g_message ("Avahi Client State Change: %d", state);
 
-    if (state == AVAHI_CLIENT_DISCONNECTED)
+    if (state == AVAHI_CLIENT_FAILURE)
     {
         /* We we're disconnected from the Daemon */
-        g_message ("Disconnected from the Avahi Daemon");
+        g_message ("Disconnected from the Avahi Daemon: %s", avahi_strerror(avahi_client_errno(client)));
 
         /* Quit the application */
         g_main_loop_quit (loop);