[PATCH] Resolve Service address in DNSSD::RemoteService

Jakub Stachowski stachowski at hypair.net
Thu Mar 6 19:45:20 GMT 2008


Dnia czwartek, 6 marca 2008, Sebastian Trüg napisał:
> Hi all,
>
> please find attached a patch for kdelibs/dnssd which adds handling of
> service addresses. ATM we only get the hostname which is completely useless
> in my network since I get stuff like "local.local".

Why is it useless. There can be machine named 'local'  after all. But if you 
then try to ping local.local. and there is lookup error then yes, something 
is broken.

>
> Address lookup was disabled via AVAHAI_LOOKUP_NO_ADDRESS. Why, I don't
> know.

I always treated hostname resolving as system resolver's job - in this case 
nss_mdnsd module. AFAIK  recent glibc versions have this built-in.

> Now the address is resolved and stored in ServiceBasePrivate, 
> accessible via the new address() method. I know that it would probably make
> more sense to only store it in RemoteService but the design sees it only as
> a trivial extension to ServiceBase without any new members.
>
> Any objections?

Two things:
1) What about mdnsd? mdnsd-remoteservice.cpp is patched to use 
ResolveEvent::m_address which does not exist. In fact mdnsd does not seem to 
be capable of resolving service and its host name in one shot. So I guess 
when resolve_callback gets called it has to first resolve hostname and only 
then emit resolved(true)

2) Why use QString as type address? I think more specific type like 
QHostAddress would be better.

>
> Cheers,
> Sebastian






More information about the kde-core-devel mailing list