X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=avahi-sharp%2FServiceResolver.cs;h=7f8901a177a6beefe0ae7ac5a672bf29c0c421cc;hb=74e9d0b1f21cefb6880d006bed1769ceaf90b28b;hp=945372beb0bee363d54b486230cfaad0e2a36d03;hpb=9a589e1f5221d1bd995b6c4fa73e3a074d4c2da4;p=catta diff --git a/avahi-sharp/ServiceResolver.cs b/avahi-sharp/ServiceResolver.cs index 945372b..7f8901a 100644 --- a/avahi-sharp/ServiceResolver.cs +++ b/avahi-sharp/ServiceResolver.cs @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of avahi. @@ -51,7 +49,7 @@ namespace Avahi private ArrayList foundListeners = new ArrayList (); private ArrayList timeoutListeners = new ArrayList (); - + [DllImport ("avahi-client")] private static extern IntPtr avahi_service_resolver_new (IntPtr client, int iface, Protocol proto, byte[] name, byte[] type, byte[] domain, @@ -82,7 +80,7 @@ namespace Avahi Stop (false); } } - + public event EventHandler Timeout { add { @@ -115,7 +113,7 @@ namespace Avahi GetLookupFlags (service.Flags)) { } - + public ServiceResolver (Client client, int iface, Protocol proto, string name, string type, string domain, Protocol aproto, LookupFlags flags) { @@ -184,6 +182,9 @@ namespace Avahi info.Address = Utility.PtrToAddress (address); info.Port = port; + if (proto == Protocol.IPv6) + info.Address.ScopeId = iface; + ArrayList txtlist = new ArrayList (); for (IntPtr l = txt; l != IntPtr.Zero; l = avahi_string_list_get_next (l)) { IntPtr buf = avahi_string_list_get_text (l);