diff options
author | James Willcox <snopr@snorp.net> | 2005-09-09 23:48:54 +0000 |
---|---|---|
committer | James Willcox <snopr@snorp.net> | 2005-09-09 23:48:54 +0000 |
commit | a9566d5dcac080d7fa91546823277c57a5d09a5f (patch) | |
tree | 1e82d5702a3e2b6c1cd19193ca3b93d4e2f065d2 /avahi-sharp/ServiceResolver.cs | |
parent | e85d5d77e2bc6f03c4146e747904488e830ec2c9 (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/ServiceResolver.cs')
-rw-r--r-- | avahi-sharp/ServiceResolver.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/avahi-sharp/ServiceResolver.cs b/avahi-sharp/ServiceResolver.cs index 1b5d51a..ef1f303 100644 --- a/avahi-sharp/ServiceResolver.cs +++ b/avahi-sharp/ServiceResolver.cs @@ -44,6 +44,7 @@ namespace Avahi private string type; private string domain; private Protocol aproto; + private ServiceResolverCallback cb; private ArrayList foundListeners = new ArrayList (); private ArrayList timeoutListeners = new ArrayList (); @@ -119,8 +120,7 @@ namespace Avahi this.type = type; this.domain = domain; this.aproto = aproto; - - + cb = OnServiceResolverCallback; } ~ServiceResolver () @@ -142,7 +142,7 @@ namespace Avahi IntPtr typePtr = Utility.StringToPtr (type); IntPtr domainPtr = Utility.StringToPtr (domain); handle = avahi_service_resolver_new (client.Handle, iface, proto, namePtr, typePtr, domainPtr, - aproto, OnServiceResolverCallback, IntPtr.Zero); + aproto, cb, IntPtr.Zero); Utility.Free (namePtr); Utility.Free (typePtr); Utility.Free (domainPtr); @@ -167,7 +167,7 @@ namespace Avahi info.Domain = Utility.PtrToString (domain); info.ServiceType = Utility.PtrToString (type); info.Name = Utility.PtrToString (name); - info.Host = Utility.PtrToString (host); + info.HostName = Utility.PtrToString (host); info.Address = Utility.PtrToAddress (address); info.Port = port; |