]> git.meshlink.io Git - catta/blobdiff - avahi-sharp/ServiceTypeBrowser.cs
update TODO
[catta] / avahi-sharp / ServiceTypeBrowser.cs
index cd6bfbb0db978947e1cf95b289e6679d8af84f86..e436da9a834555e341b5a1546cd5b26db22692c5 100644 (file)
@@ -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);
         }