Author: mlytwyn
Date: Thu May 19 21:49:48 2016
New Revision: 39794

URL: http://svn.gna.org/viewcvs/gnustep?rev=39794&view=rev
Log:
Avoid invoking NSNetServices delegate twice on resolve

Modified:
    libs/base/branches/gnustep_testplant_branch/Source/GSMDNSNetServices.m
    libs/base/branches/gnustep_testplant_branch/Source/GSNetServices.h

Modified: libs/base/branches/gnustep_testplant_branch/Source/GSMDNSNetServices.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSMDNSNetServices.m?rev=39794&r1=39793&r2=39794&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/GSMDNSNetServices.m      
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/GSMDNSNetServices.m      
Thu May 19 21:49:48 2016
@@ -998,6 +998,23 @@
 #endif
   }
   UNLOCK(service);
+}
+
+/**
+ * <em>Description forthcoming</em>
+ *
+ *
+ */
+// TESTPLANT-MAL-05192016: avoid duplicate resolution notification due to
+// retain/release cycles as specified in Cocoa documentation.
+// FIXME: obviously not the best solution...
+- (void) netServiceDidResolveAddress: service
+{
+  if (_didNotifyOfResolve == NO)
+  {
+    [super netServiceDidResolveAddress: service];
+    _didNotifyOfResolve = YES;
+  }
 }
 
 /**

Modified: libs/base/branches/gnustep_testplant_branch/Source/GSNetServices.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/GSNetServices.h?rev=39794&r1=39793&r2=39794&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/GSNetServices.h  
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/GSNetServices.h  Thu May 
19 21:49:48 2016
@@ -158,6 +158,7 @@
 {
   DNSServiceRef _resolverRef;
   DNSServiceRef _queryRef;
+  BOOL          _didNotifyOfResolve;
 }
 @end
 


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to