From a9566d5dcac080d7fa91546823277c57a5d09a5f Mon Sep 17 00:00:00 2001 From: James Willcox Date: Fri, 9 Sep 2005 23:48:54 +0000 Subject: s/Host/HostName/ in a couple places, and keep references to callbacks to avoid crashing git-svn-id: file:///home/lennart/svn/public/avahi/trunk@554 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-sharp/ServiceTypeBrowser.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'avahi-sharp/ServiceTypeBrowser.cs') 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); } -- cgit