diff options
author | dgp <dgp@users.sourceforge.net> | 2015-09-23 17:07:40 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-09-23 17:07:40 (GMT) |
commit | eae476cd469d717769094e0be93d6c804113ab89 (patch) | |
tree | 96bb15abcaf084d545a65c64ebc9da85434da8ae | |
parent | e52bf0ecd422e64401d71475c5995f18c49c8561 (diff) | |
parent | 773fea02280ffb98f9d79bec83e4121e92f1be28 (diff) | |
download | tcl-eae476cd469d717769094e0be93d6c804113ab89.zip tcl-eae476cd469d717769094e0be93d6c804113ab89.tar.gz tcl-eae476cd469d717769094e0be93d6c804113ab89.tar.bz2 |
[e0a7b3e5f8] Add missing UpdateInterest call in DoRead().
-rw-r--r-- | generic/tclIO.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 09b2537..0910cc5 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -5336,6 +5336,7 @@ DoReadChars( assert( statePtr->inputEncodingFlags & TCL_ENCODING_END ); assert( !GotFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR) ); + /* TODO: We don't need this call? */ UpdateInterest(chanPtr); return 0; } @@ -5347,6 +5348,7 @@ DoReadChars( } ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF); statePtr->inputEncodingFlags &= ~TCL_ENCODING_END; + /* TODO: We don't need this call? */ UpdateInterest(chanPtr); return 0; } @@ -7929,6 +7931,11 @@ Tcl_NotifyChannel( */ if (chanPtr->typePtr != NULL) { + /* + * TODO: This call may not be needed. If a handler induced a + * change in interest, that handler should have made its own + * UpdateInterest() call, one would think. + */ UpdateInterest(chanPtr); } @@ -9065,6 +9072,7 @@ DoRead( assert( statePtr->inputEncodingFlags & TCL_ENCODING_END ); assert( !GotFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR) ); + /* TODO: Don't need this call */ UpdateInterest(chanPtr); return 0; } @@ -9076,6 +9084,7 @@ DoRead( } ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF); statePtr->inputEncodingFlags &= ~TCL_ENCODING_END; + /* TODO: Don't need this call */ UpdateInterest(chanPtr); return 0; } @@ -9142,7 +9151,6 @@ DoRead( */ if (bytesToRead == 0) { - UpdateInterest(chanPtr); break; } @@ -9151,7 +9159,6 @@ DoRead( */ if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) { - UpdateInterest(chanPtr); break; } @@ -9176,7 +9183,6 @@ DoRead( } else if (GotFlag(statePtr, CHANNEL_BLOCKED)) { /* ...and we cannot get more now. */ SetFlag(statePtr, CHANNEL_NEED_MORE_DATA); - UpdateInterest(chanPtr); break; } else { /* ... so we need to get some. */ @@ -9228,6 +9234,7 @@ DoRead( || Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0); assert( !(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED) == (CHANNEL_EOF|CHANNEL_BLOCKED)) ); + UpdateInterest(chanPtr); TclChannelRelease((Tcl_Channel)chanPtr); return (int)(p - dst); } |