X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-sharp%2FServiceTypeBrowser.cs;h=e436da9a834555e341b5a1546cd5b26db22692c5;hb=ddfdfa8dd9dee6a2ff3046717b2fc120a5dfd34d;hp=cd6bfbb0db978947e1cf95b289e6679d8af84f86;hpb=a21074b9ea4b11b74d114e2669248f979caf0d3a;p=catta diff --git a/avahi-sharp/ServiceTypeBrowser.cs b/avahi-sharp/ServiceTypeBrowser.cs index cd6bfbb..e436da9 100644 --- a/avahi-sharp/ServiceTypeBrowser.cs +++ b/avahi-sharp/ServiceTypeBrowser.cs @@ -1,3 +1,5 @@ +/* $Id$ */ + /*** This file is part of avahi. @@ -44,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 (); @@ -99,6 +102,7 @@ namespace Avahi this.iface = iface; this.proto = proto; this.domain = domain; + cb = OnServiceTypeBrowserCallback; } ~ServiceTypeBrowser () @@ -118,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); }