[avahi] Mono-bindings: ServiceResolver not resolving...

Lennart Poettering lennart at poettering.de
Thu Sep 29 16:33:32 PDT 2005


On Thu, 29.09.05 23:57, Celso Pinto (cpinto at yimports.com) wrote:

Ho!

> I have an application that publishes a service-type and has a
> ServiceBrowser that's listening for other services of the same type. 
> 
> When this application is executed and another computer publishes this
> service-type, the application saves the service name.
> 
> If I launch the application again, on the first computer, it won't be
> notified of a "service added" event for the service published on the
> second computer, but that shouldn't really matter because I've cached
> the second computer's service name, so I should be able to resolve it by
> using the ServiceResolver(client,serviceName,type,domain).

Hmm? I don't quite understand. Why doesn't the first computer get
notified about "service added"? Is this a bug in Avahi?

Did you stop the program on your second machine? If so it's not
surprising that you cannot resolve the service it created. Avahi sends
out goodbye records for a services where the owning program
terminates, so that they removed from all caches on the network.

Is that Avahi 0.5 or SVN?

> The problem is that after ServiceResolver invokes
> avahi_service_resolver_new with it's private callback, this callback is
> *never* invoked. It seems that it hangs while trying to lookup the
> service when using the service name.

Not even with a TIMEOUT event? shouldn't happen.

Would you be so kind and dump mdns traffic in a capture file with
tcpdump or ethereal for me? That way I can analyize what is happening
exactly. Capture string is "udp port 5353".

> Resolving services after a "service added" notification works just fine
> though.

This shouldn't make a difference (unless AVahi is broken.)

> If this isn't a known bug, I'm more than willing to send the source
> code.

Yes, please. That would be best.

Lennart

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


More information about the avahi mailing list