g_message ("Avahi Client State Change: %d", state);
- if (state == AVAHI_CLIENT_DISCONNECTED)
+ if (state == AVAHI_CLIENT_FAILURE)
{
/* We we're disconnected from the Daemon */
- g_message ("Disconnected from the Avahi Daemon");
+ g_message ("Disconnected from the Avahi Daemon: %s", avahi_strerror(avahi_client_errno(client)));
/* Quit the application */
g_main_loop_quit (loop);
/* Create a new AvahiClient instance */
client = avahi_client_new (poll_api, /* AvahiPoll object from above */
+ 0,
avahi_client_callback, /* Callback function for Client state changes */
loop, /* User data */
&error); /* Error return */