X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-utils%2Favahi-resolve-host-name.c;h=f63442906087562889a55ced08ed2e00f955704b;hb=6ecd227ceadc32ed229246aa61df6361c7b58a95;hp=6a35f1b383b0bceb15fbe209105de3d50564522d;hpb=3962ee42287ee3276f79795d1c106b22ac49f17d;p=catta diff --git a/avahi-utils/avahi-resolve-host-name.c b/avahi-utils/avahi-resolve-host-name.c index 6a35f1b..f634429 100644 --- a/avahi-utils/avahi-resolve-host-name.c +++ b/avahi-utils/avahi-resolve-host-name.c @@ -148,14 +148,10 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN avahi_simple_poll_quit(simple_poll); break; - case AVAHI_CLIENT_DISCONNECTED: - fprintf(stderr, "Client disconnected, exiting.\n"); - avahi_simple_poll_quit(simple_poll); - break; - case AVAHI_CLIENT_S_REGISTERING: case AVAHI_CLIENT_S_RUNNING: case AVAHI_CLIENT_S_COLLISION: + case AVAHI_CLIENT_CONNECTING: ; } } @@ -271,7 +267,7 @@ int main(int argc, char *argv[]) { if (sigint_install(simple_poll) < 0) goto fail; - if (!(client = avahi_client_new(avahi_simple_poll_get(simple_poll), client_callback, NULL, &error))) { + if (!(client = avahi_client_new(avahi_simple_poll_get(simple_poll), 0, client_callback, NULL, &error))) { fprintf(stderr, "Failed to create client object: %s\n", avahi_strerror(error)); goto fail; }