Tcl Source Code

Artifact [717a08ae8e]
Login

Artifact 717a08ae8e366f25a8272457912c5fb435359bac:

Attachment "tls.patch" to ticket [c31ca233ca] added by dgp 2014-06-30 20:25:22.
? Makefile
? config.log
? config.status
? pkgIndex.tcl
? tls.patch
Index: tlsIO.c
===================================================================
RCS file: /cvsroot/tls/tls/tlsIO.c,v
retrieving revision 1.16
diff -u -r1.16 tlsIO.c
--- tlsIO.c	22 Jun 2007 21:20:38 -0000	1.16
+++ tlsIO.c	30 Jun 2014 17:25:52 -0000
@@ -729,6 +729,19 @@
 	statePtr->timer = (Tcl_TimerToken) NULL;
     }
 
+    if (statePtr->flags & TLS_TCL_CALLBACK) {
+	return 0;
+    }
+
+    if (statePtr->flags & TLS_TCL_INIT
+	    && !SSL_is_init_finished(statePtr->ssl)) {
+	int errorCode;
+	if (Tls_WaitForConnect(statePtr, &errorCode) <= 0
+		&& errorCode == EAGAIN) {
+	    return 0;
+	}
+    }
+
     return mask;
 }