Check-in [afec51b85b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Applied patch from Jinhu to address [94c6a431fee]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:afec51b85b037bb6a850d8315220894b70ee84b1bf5bb982fac95087f4a263f6
User & Date: rkeene 2018-10-30 14:20:50
Context
2019-04-09
15:58
Better handling of the case where the shared and static extensions are the same (AIX) check-in: 9c59fec751 user: rkeene tags: trunk
2018-11-07
23:27
Started adding support for TLSv1.3 check-in: e245d231ee user: rkeene tags: enhancement/tls-1.3
2018-10-30
14:20
Applied patch from Jinhu to address [94c6a431fee] check-in: afec51b85b user: rkeene tags: trunk
2018-02-07
15:37
Updated to reset "eofchar" and "encoding" when importing channels as well as translation and blocking (part of [f798e2ea12]) check-in: 1d757f7e2d user: rkeene tags: trunk
Changes

Changes to tlsBIO.c.

   260    260   			break;
   261    261   		case BIO_CTRL_EOF:
   262    262   			dprintf("Got BIO_CTRL_EOF");
   263    263   			ret = Tcl_Eof(chan);
   264    264   			break;
   265    265   		case BIO_CTRL_PENDING:
   266    266   			dprintf("Got BIO_CTRL_PENDING");
   267         -			ret = ((chan) ? 1 : 0);
          267  +			ret = ((chan) ? Tcl_InputBuffered(chan) : 0);
   268    268   			dprintf("BIO_CTRL_PENDING(%d)", (int) ret);
   269    269   			break;
   270    270   		case BIO_CTRL_WPENDING:
   271    271   			dprintf("Got BIO_CTRL_WPENDING");
   272    272   			ret = 0;
   273    273   			break;
   274    274   		case BIO_CTRL_DUP:

Changes to tlsIO.c.

   741    741   
   742    742   	if (statePtr->timer != (Tcl_TimerToken) NULL) {
   743    743               dprintf("A timer was found, deleting it");
   744    744   	    Tcl_DeleteTimerHandler(statePtr->timer);
   745    745   	    statePtr->timer = (Tcl_TimerToken) NULL;
   746    746   	}
   747    747   
   748         -	if ((mask & TCL_READABLE) && Tcl_InputBuffered(statePtr->self) > 0) {
   749         -	    /*
   750         -	     * There is interest in readable events and we actually have
   751         -	     * data waiting, so generate a timer to flush that.
   752         -	     */
   753         -            dprintf("Creating a new timer since data appears to be waiting");
   754         -	    statePtr->timer = Tcl_CreateTimerHandler(TLS_TCL_DELAY,
   755         -		    TlsChannelHandlerTimer, (ClientData) statePtr);
          748  +	if (mask & TCL_READABLE) {
          749  +		if (Tcl_InputBuffered(statePtr->self) > 0 || BIO_ctrl_pending(statePtr->bio) > 0) {
          750  +			/*
          751  +			 * There is interest in readable events and we actually have
          752  +			 * data waiting, so generate a timer to flush that.
          753  +			 */
          754  +			dprintf("Creating a new timer since data appears to be waiting");
          755  +			statePtr->timer = Tcl_CreateTimerHandler(TLS_TCL_DELAY, TlsChannelHandlerTimer, (ClientData) statePtr);
          756  +		}
   756    757   	}
   757    758   }
   758    759   
   759    760   /*
   760    761    *-------------------------------------------------------------------
   761    762    *
   762    763    * TlsGetHandleProc --