Logo Search packages:      
Sourcecode: avahi version File versions  Download package

void avahi_client_free ( AvahiClient client  ) 

Free a client instance. This will automatically free all associated browser, resolve and entry group objects. All pointers to such objects become invalid!

Definition at line 610 of file client.c.

References avahi_service_resolver_free().

                                            {
    assert(client);

    if (client->bus)
        /* Disconnect in advance, so that the free() functions won't
         * issue needless server calls */
#ifdef HAVE_DBUS_CONNECTION_CLOSE
        dbus_connection_close(client->bus);
#else
        dbus_connection_disconnect(client->bus);
#endif
    
    while (client->groups)
        avahi_entry_group_free(client->groups);

    while (client->domain_browsers)
        avahi_domain_browser_free(client->domain_browsers);

    while (client->service_browsers)
        avahi_service_browser_free(client->service_browsers);

    while (client->service_type_browsers)
        avahi_service_type_browser_free(client->service_type_browsers);

    while (client->service_resolvers)
        avahi_service_resolver_free(client->service_resolvers);

    while (client->host_name_resolvers)
        avahi_host_name_resolver_free(client->host_name_resolvers);

    while (client->address_resolvers)
        avahi_address_resolver_free(client->address_resolvers);

    while (client->record_browsers)
        avahi_record_browser_free(client->record_browsers);
    
    if (client->bus)
        dbus_connection_unref(client->bus);

    avahi_free(client->version_string);
    avahi_free(client->host_name);
    avahi_free(client->host_name_fqdn);
    avahi_free(client->domain_name);
    
    avahi_free(client);
}


Generated by  Doxygen 1.6.0   Back to index