X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-sharp%2FAddressResolver.cs;fp=avahi-sharp%2FAddressResolver.cs;h=6b0d0309f0a7c1ac92780d293521577589d3f7c0;hb=a9566d5dcac080d7fa91546823277c57a5d09a5f;hp=8a0b66ba6e3d63ce2f6b280af0b40e423f53394a;hpb=e85d5d77e2bc6f03c4146e747904488e830ec2c9;p=catta diff --git a/avahi-sharp/AddressResolver.cs b/avahi-sharp/AddressResolver.cs index 8a0b66b..6b0d030 100644 --- a/avahi-sharp/AddressResolver.cs +++ b/avahi-sharp/AddressResolver.cs @@ -41,6 +41,7 @@ namespace Avahi private int iface; private Protocol proto; private IPAddress address; + private AddressResolverCallback cb; private IPAddress currentAddress; private string currentHost; @@ -100,6 +101,7 @@ namespace Avahi this.iface = iface; this.proto = proto; this.address = address; + cb = OnAddressResolverCallback; } ~AddressResolver () @@ -119,7 +121,7 @@ namespace Avahi IntPtr addrPtr = Utility.StringToPtr (address.ToString ()); handle = avahi_address_resolver_new (client.Handle, iface, proto, addrPtr, - OnAddressResolverCallback, IntPtr.Zero); + cb, IntPtr.Zero); Utility.Free (addrPtr); }