]> git.meshlink.io Git - catta/blobdiff - examples/client-browse-services.c
* Rename AVAHI_ERR_NOT_CONNECTED to AVAHI_ERR_DISCONNECTED
[catta] / examples / client-browse-services.c
index c5a1cbd978f3930a7b5cee6a63a66b2054130edf..00703e61b316152c128f0c8a55ec633c2d099936 100644 (file)
@@ -145,8 +145,8 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN
 
     /* Called whenever the client or server state changes */
 
-    if (state == AVAHI_CLIENT_DISCONNECTED) {
-        fprintf(stderr, "Server connection terminated.\n");
+    if (state == AVAHI_CLIENT_FAILURE) {
+        fprintf(stderr, "Server connection failre: %s\n", avahi_strerror(avahi_client_errno(c)));
         avahi_simple_poll_quit(simple_poll);
     }
 }