X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-sharp%2FServiceTypeBrowser.cs;h=e436da9a834555e341b5a1546cd5b26db22692c5;hb=ddfdfa8dd9dee6a2ff3046717b2fc120a5dfd34d;hp=c3b8159dcfd5b930092f57385b6418db38e8dea2;hpb=a26804ae8742b59b220b5a0776f42de3da026d6a;p=catta diff --git a/avahi-sharp/ServiceTypeBrowser.cs b/avahi-sharp/ServiceTypeBrowser.cs index c3b8159..e436da9 100644 --- a/avahi-sharp/ServiceTypeBrowser.cs +++ b/avahi-sharp/ServiceTypeBrowser.cs @@ -46,6 +46,7 @@ namespace Avahi private int iface; private Protocol proto; private string domain; + private ServiceTypeBrowserCallback cb; private ArrayList addListeners = new ArrayList (); private ArrayList removeListeners = new ArrayList (); @@ -101,6 +102,7 @@ namespace Avahi this.iface = iface; this.proto = proto; this.domain = domain; + cb = OnServiceTypeBrowserCallback; } ~ServiceTypeBrowser () @@ -120,7 +122,7 @@ namespace Avahi IntPtr domainPtr = Utility.StringToPtr (domain); handle = avahi_service_type_browser_new (client.Handle, iface, (int) proto, domainPtr, - OnServiceTypeBrowserCallback, IntPtr.Zero); + cb, IntPtr.Zero); Utility.Free (domainPtr); }