Author: rfm
Date: Sun Mar  8 10:22:11 2015
New Revision: 38386

URL: http://svn.gna.org/viewcvs/gnustep?rev=38386&view=rev
Log:
Fix looping session startup

Modified:
    libs/base/trunk/ChangeLog
    libs/base/trunk/Source/NSFileHandle.m

Modified: libs/base/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=38386&r1=38385&r2=38386&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog   (original)
+++ libs/base/trunk/ChangeLog   Sun Mar  8 10:22:11 2015
@@ -1,3 +1,10 @@
+2015-03-08  Richard Frith-Macdonald <[email protected]>
+
+       * Source/NSFileHandle.m: ([-sslHandshakeEstablished:outgoing:])
+       If we can't create a session, the handshake should fail rather
+       than being retried.  Fix infinite loop establish session on closed
+       handle.
+
 2015-02-28  Richard Frith-Macdonald <[email protected]>
 
        * Headers/GNUstepBase/NSDebug+GNUstepBase.h:

Modified: libs/base/trunk/Source/NSFileHandle.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSFileHandle.m?rev=38386&r1=38385&r2=38386&view=diff
==============================================================================
--- libs/base/trunk/Source/NSFileHandle.m       (original)
+++ libs/base/trunk/Source/NSFileHandle.m       Sun Mar  8 10:22:11 2015
@@ -1001,12 +1001,14 @@
 
   if (YES == [session active])
     {
+      *result =  YES;
       return YES;      /* Already connected.   */
     }
 
   if (YES == isStandardFile)
     {
       NSLog(@"Attempt to perform ssl handshake with a standard file");
+      *result =  NO;
       return YES;
     }
 
@@ -1046,6 +1048,11 @@
 
   if (NO == [session handshake])
     {
+      *result = NO;
+      if (nil == session)
+        {
+          return YES;   // Unable to create session
+        }
       return NO;        // Need more.
     }
   else


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

Reply via email to