From 6ecd227ceadc32ed229246aa61df6361c7b58a95 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 8 Nov 2005 21:56:28 +0000 Subject: * add new flags parameter to avahi_client_new() * introduce flags AVAHI_CLIENT_NO_FAIL and AVAHI_CLIENT_IGNORE_USER_CONFIG * beef up avahi-browse to show how AVAHI_CLIENT_NO_FAIL may be used: add a new parameter "-f" which tells avahi-browse to stay running when the daemon disconnects from DBUS and reconnect when it reappears. For now dbus-daemon restarts are not handled and result in an AVAHI_CLIENT_FAIL event. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@937 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-utils/avahi-resolve-host-name.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'avahi-utils/avahi-resolve-host-name.c') diff --git a/avahi-utils/avahi-resolve-host-name.c b/avahi-utils/avahi-resolve-host-name.c index 2a65f75..f634429 100644 --- a/avahi-utils/avahi-resolve-host-name.c +++ b/avahi-utils/avahi-resolve-host-name.c @@ -151,6 +151,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN case AVAHI_CLIENT_S_REGISTERING: case AVAHI_CLIENT_S_RUNNING: case AVAHI_CLIENT_S_COLLISION: + case AVAHI_CLIENT_CONNECTING: ; } } @@ -266,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; } -- cgit