[Bug 47072] Add self-advertise support on Windows using the Apple Bonjour DNS-SD implementation
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Mar 9 18:48:22 CET 2012
https://bugs.freedesktop.org/show_bug.cgi?id=47072
--- Comment #3 from Olli Salli <olli.salli at collabora.co.uk> 2012-03-09 09:48:22 PST ---
(In reply to comment #2)
> BonjourSelf:
>
> + char *host_name = (char *) malloc (kDNSServiceMaxDomainName);
> + error_type = DNSServiceConstructFullName (host_name, name, regtype,
> domain);
> + _self->name = g_strdup_printf ("%s@%s", _self->published_name,
> host_name);
>
> Mmm... I don't think concatenating those things result in a sensible host name
> (especially one unique on your network). Won't this lead to a very weird and
> potentially conflicting JID? (And possibly make your address unresolvable in
> the network...)
>
> The Avahi backend uses avahi_client_get_host_name(). Which queries the daemon
> for the host name it chose. Basically that takes the one in the config file, or
> if missing, what gethostname() returns, and increments a digit in the end until
> nobody else in the network has the same name. Apple mDNSResponder seems to do
> the same, but doesn't seem to have any way to report back what it ended up
> choosing. But don't we need that knowledge here?
>
> Maybe I'm just too tired for this at the moment... what do your JIDs look like?
>
FWIW the libpurple Win32 prpl (using Bonjour) uses a g_get_host_name() wrapper
where the avahi prpl uses avahi_client_get_host_name().
I think that's the best we can reasonably achieve as well.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
More information about the telepathy-bugs
mailing list