[avahi] gnome-vfs avahi support

Lennart Poettering lennart at poettering.de
Tue Oct 25 10:25:59 PDT 2005


On Tue, 25.10.05 18:39, Alexander Larsson (alexl at redhat.com) wrote:

> I just commited initial support for Avahi to gnome-vfs HEAD.
> It seems to work, although I haven't done any heavy testing.
> 

Cool stuff.

Some notes:

There is no need to call avahi_client_get_version_string() after
initialization to test if everything is working. Newer versions of
avahi (including the upcoming avahi 0.6) do a call like this in
avahi_client_new() anyway, to make sure that the client and server
versions match. Older versions already did a GetState() call to get the
initial state of the avahi daemon.

This is ugly:

<snip>
 text_len = avahi_string_list_serialize (txt, NULL, 0);
 text = g_malloc (text_len);
 text_len = avahi_string_list_serialize (txt,  text, text_len);
 
 hash = decode_txt_record (text, text_len);
</snip>

Consider enumerating though the string list directly instead of
serializing and parsing it again.

Please consider supporting "_webdavs._tcp" in addition to "_wedav._tcp"!

The rest looks fine to me. Nice work!

When Avahi 0.6 is finally released some improvements to your code
could certainly be made: support for AVAHI_BROWSER_ALL_FOR_NOW (which
is issued as soon as avahi thinks the list of services found is
"complete") and support for avahis own implementation of "DNS-SD over
Unicast DNS" aka "Wide Area DNS-SD".

Lennart

-- 
Lennart Poettering; lennart [at] poettering [dot] de
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.de/lennart/


More information about the avahi mailing list