Changeset 118

Show
Ignore:
Timestamp:
03/03/07 15:49:57 (2 years ago)
Author:
tulloss2
Message:

Hopefully fixes the Zeroconf exceptions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmp/trunk/Mono.Zeroconf/BrowseService.cs

    r105 r118  
    3737    public sealed class BrowseService : Service 
    3838    { 
     39                private Native.DNSServiceResolveReply resolveReply; 
    3940        private bool is_resolved = false; 
    4041        private bool resolve_pending = false; 
     
    4849        public BrowseService(string name, string replyDomain, string regtype) : base(name, replyDomain, regtype) 
    4950        { 
     51                        resolveReply = OnResolveReply; 
    5052        } 
     53 
     54                ~BrowseService() 
     55                { 
     56                        GC.KeepAlive(resolveReply); 
     57                } 
    5158 
    5259        public void Resolve() 
     
    7077            ServiceRef sd_ref; 
    7178            ServiceError error = Native.DNSServiceResolve(out sd_ref, ServiceFlags.None,  
    72                 InterfaceIndex, Name, RegType, ReplyDomain, OnResolveReply, IntPtr.Zero); 
     79                InterfaceIndex, Name, RegType, ReplyDomain, resolveReply, IntPtr.Zero); 
    7380                 
    7481            if(error != ServiceError.NoError) {