summaryrefslogtreecommitdiffstats
path: root/avahi-utils
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-11-06 15:00:43 +0000
committerLennart Poettering <lennart@poettering.net>2005-11-06 15:00:43 +0000
commit6f37f0e1126ad3776b80dbd64701f38a58738921 (patch)
tree43d640abb3bde62d7e664b305a1ac069dc8e2325 /avahi-utils
parentfbce111b069aa1e4c701ed37ee1d9f6d6cefaac5 (diff)
add new client state AVAHI_CLIENT_FAILURE
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@931 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-utils')
-rw-r--r--avahi-utils/avahi-browse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/avahi-utils/avahi-browse.c b/avahi-utils/avahi-browse.c
index 169f62b..b8910fc 100644
--- a/avahi-utils/avahi-browse.c
+++ b/avahi-utils/avahi-browse.c
@@ -473,8 +473,13 @@ static void browse_domains(Config *c) {
n_all_for_now++;
}
-static void client_callback(AVAHI_GCC_UNUSED AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) {
+static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) {
switch (state) {
+ case AVAHI_CLIENT_FAILURE:
+ fprintf(stderr, "Client failure, exiting: %s\n", avahi_strerror(avahi_client_errno(c)));
+ avahi_simple_poll_quit(simple_poll);
+ break;
+
case AVAHI_CLIENT_DISCONNECTED:
fprintf(stderr, "Client disconnected, exiting.\n");
avahi_simple_poll_quit(simple_poll);