diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-11-08 21:56:28 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-11-08 21:56:28 +0000 |
commit | 6ecd227ceadc32ed229246aa61df6361c7b58a95 (patch) | |
tree | 95a9f35ccc096839faba3aa22afe07e9743d18a3 /examples/client-publish-service.c | |
parent | 0d787cfca3b6e2c0755a54ca732a85e15756aa57 (diff) |
* 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
Diffstat (limited to 'examples/client-publish-service.c')
-rw-r--r-- | examples/client-publish-service.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/client-publish-service.c b/examples/client-publish-service.c index 50a7002..a9f9f8c 100644 --- a/examples/client-publish-service.c +++ b/examples/client-publish-service.c @@ -157,6 +157,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN break; + case AVAHI_CLIENT_CONNECTING: case AVAHI_CLIENT_S_REGISTERING: ; } @@ -176,7 +177,7 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) { name = avahi_strdup("MegaPrinter"); /* Allocate a new client */ - client = avahi_client_new(avahi_simple_poll_get(simple_poll), client_callback, NULL, &error); + client = avahi_client_new(avahi_simple_poll_get(simple_poll), 0, client_callback, NULL, &error); /* Check wether creating the client object succeeded */ if (!client) { |