From: James Willcox Date: Sun, 25 Sep 2005 22:20:39 +0000 (+0000) Subject: oops, forgot some flag bits in ServiceResolver X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=3a8e64847dff76b56599e37bd31245db9f9ac8ff;p=catta oops, forgot some flag bits in ServiceResolver git-svn-id: file:///home/lennart/svn/public/avahi/trunk@621 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-sharp/ServiceResolver.cs b/avahi-sharp/ServiceResolver.cs index a39299d..e94bd13 100644 --- a/avahi-sharp/ServiceResolver.cs +++ b/avahi-sharp/ServiceResolver.cs @@ -102,19 +102,21 @@ namespace Avahi public ServiceResolver (Client client, string name, string type, string domain) : this (client, -1, Protocol.Unspecified, name, type, domain, - Protocol.Unspecified) + Protocol.Unspecified, + LookupFlags.None) { } public ServiceResolver (Client client, ServiceInfo service) : this (client, service.NetworkInterface, service.Protocol, service.Name, service.ServiceType, service.Domain, - Protocol.Unspecified) + Protocol.Unspecified, + GetLookupFlags (service.Flags)) { } public ServiceResolver (Client client, int iface, Protocol proto, string name, - string type, string domain, Protocol aproto) + string type, string domain, Protocol aproto, LookupFlags flags) { this.client = client; this.iface = iface; @@ -123,6 +125,7 @@ namespace Avahi this.type = type; this.domain = domain; this.aproto = aproto; + this.flags = flags; cb = OnServiceResolverCallback; } @@ -209,5 +212,16 @@ namespace Avahi handler (this, new EventArgs ()); } } + + private static LookupFlags GetLookupFlags (LookupResultFlags rflags) { + LookupFlags ret = LookupFlags.None; + + if ((rflags & LookupResultFlags.Multicast) > 0) + ret |= LookupFlags.UseMulticast; + if ((rflags & LookupResultFlags.WideArea) > 0) + ret |= LookupFlags.UseWideArea; + + return ret; + } } }