summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-09-23 17:15:53 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-09-23 17:15:53 (GMT)
commit463d0be997dba81c675f653bbddde143433d468d (patch)
treecc7d1052b2cb6560d97dc5a0760c4ff7dd82a759 /generic
parentfe70ef2e7949c720d01eb97b30effc6294794cac (diff)
parenteae476cd469d717769094e0be93d6c804113ab89 (diff)
downloadtcl-463d0be997dba81c675f653bbddde143433d468d.zip
tcl-463d0be997dba81c675f653bbddde143433d468d.tar.gz
tcl-463d0be997dba81c675f653bbddde143433d468d.tar.bz2
[e0a7b3e5f8] Add missing UpdateInterest call in DoRead().
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index b7f895f..d154c77 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -5773,6 +5773,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;
}
@@ -5784,6 +5785,7 @@ DoReadChars(
}
ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF);
statePtr->inputEncodingFlags &= ~TCL_ENCODING_END;
+ /* TODO: We don't need this call? */
UpdateInterest(chanPtr);
return 0;
}
@@ -8345,6 +8347,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);
}
@@ -9749,6 +9756,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;
}
@@ -9760,6 +9768,7 @@ DoRead(
}
ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF);
statePtr->inputEncodingFlags &= ~TCL_ENCODING_END;
+ /* TODO: Don't need this call */
UpdateInterest(chanPtr);
return 0;
}
@@ -9826,7 +9835,6 @@ DoRead(
*/
if (bytesToRead == 0) {
- UpdateInterest(chanPtr);
break;
}
@@ -9835,7 +9843,6 @@ DoRead(
*/
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
- UpdateInterest(chanPtr);
break;
}
@@ -9860,7 +9867,6 @@ DoRead(
} else if (statePtr->flags & CHANNEL_BLOCKED) {
/* ...and we cannot get more now. */
SetFlag(statePtr, CHANNEL_NEED_MORE_DATA);
- UpdateInterest(chanPtr);
break;
} else {
/* ... so we need to get some. */
@@ -9912,6 +9918,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);
}