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

int avahi_domain_browser_free ( AvahiDomainBrowser  ) 

Cleans up and frees an AvahiDomainBrowser object

Definition at line 239 of file browser.c.

References AVAHI_LLIST_REMOVE, and AVAHI_OK.

                                                      {
    AvahiClient *client;
    int r = AVAHI_OK;

    assert(b);
    assert(b->ref >= 1);

    if (--(b->ref) >= 1)
        return AVAHI_OK;

    client = b->client;

    if (b->path && avahi_client_is_connected(b->client))
        r = avahi_client_simple_method_call(client, b->path, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "Free");

    AVAHI_LLIST_REMOVE(AvahiDomainBrowser, domain_browsers, client->domain_browsers, b);

    if (b->defer_timeout)
        b->client->poll_api->timeout_free(b->defer_timeout);

    avahi_string_list_free(b->static_browse_domains);
    avahi_free(b->path);
    avahi_free(b);

    return r;
}


Generated by  Doxygen 1.6.0   Back to index