summaryrefslogtreecommitdiffstats
path: root/avahi-sharp/ServiceBrowser.cs
diff options
context:
space:
mode:
authorJames Willcox <snopr@snorp.net>2005-09-09 23:48:54 +0000
committerJames Willcox <snopr@snorp.net>2005-09-09 23:48:54 +0000
commita9566d5dcac080d7fa91546823277c57a5d09a5f (patch)
tree1e82d5702a3e2b6c1cd19193ca3b93d4e2f065d2 /avahi-sharp/ServiceBrowser.cs
parente85d5d77e2bc6f03c4146e747904488e830ec2c9 (diff)
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
Diffstat (limited to 'avahi-sharp/ServiceBrowser.cs')
-rw-r--r--avahi-sharp/ServiceBrowser.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/avahi-sharp/ServiceBrowser.cs b/avahi-sharp/ServiceBrowser.cs
index 3ed50bc..a96040c 100644
--- a/avahi-sharp/ServiceBrowser.cs
+++ b/avahi-sharp/ServiceBrowser.cs
@@ -37,7 +37,7 @@ namespace Avahi
public string ServiceType;
public string Name;
- public string Host;
+ public string HostName;
public IPAddress Address;
public UInt16 Port;
public byte[][] Text;
@@ -56,6 +56,7 @@ namespace Avahi
private Protocol proto;
private string domain;
private string type;
+ private ServiceBrowserCallback cb;
private ArrayList addListeners = new ArrayList ();
private ArrayList removeListeners = new ArrayList ();
@@ -113,8 +114,7 @@ namespace Avahi
this.proto = proto;
this.domain = domain;
this.type = type;
-
-
+ cb = OnServiceBrowserCallback;
}
~ServiceBrowser ()
@@ -135,7 +135,7 @@ namespace Avahi
IntPtr domainPtr = Utility.StringToPtr (domain);
IntPtr typePtr = Utility.StringToPtr (type);
handle = avahi_service_browser_new (client.Handle, iface, (int) proto, typePtr, domainPtr,
- OnServiceBrowserCallback, IntPtr.Zero);
+ cb, IntPtr.Zero);
Utility.Free (domainPtr);
Utility.Free (typePtr);
}
@@ -158,7 +158,7 @@ namespace Avahi
info.Domain = Utility.PtrToString (domain);
info.ServiceType = Utility.PtrToString (type);
info.Name = Utility.PtrToString (name);
- info.Host = null;
+ info.HostName = null;
info.Address = null;
info.Port = 0;
info.Text = null;