summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-08-22 17:28:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-08-22 17:28:46 (GMT)
commit1afecbb517918b23c0892a9deb80f0b7721cacfe (patch)
tree1e459fa6409115d1c7da0dab5c01012c85c3cf57 /generic
parent58a456c528984bf6b55516fc1f7ede1a0e542627 (diff)
parent2b50c1447fc0d201d7afada548a16fc6cf6645ae (diff)
downloadtcl-1afecbb517918b23c0892a9deb80f0b7721cacfe.zip
tcl-1afecbb517918b23c0892a9deb80f0b7721cacfe.tar.gz
tcl-1afecbb517918b23c0892a9deb80f0b7721cacfe.tar.bz2
merge trunk; stamp release date.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 66c0be6..eaa0aeb 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8115,7 +8115,7 @@ Tcl_NotifyChannel(
if ((chPtr->mask & mask) != 0) {
nh.nextHandlerPtr = chPtr->nextPtr;
- chPtr->proc(chPtr->clientData, mask);
+ chPtr->proc(chPtr->clientData, chPtr->mask & mask);
chPtr = nh.nextHandlerPtr;
} else {
chPtr = chPtr->nextPtr;
@@ -9513,34 +9513,22 @@ DoRead(
break;
}
- /* If there is no full buffer, attempt to create and/or fill one. */
-
- while (!IsBufferFull(bufPtr)) {
- int code;
+ /*
+ * If there is not enough data in the buffers to possibly
+ * complete the read, then go get more.
+ */
+ if (bufPtr == NULL || BytesLeft(bufPtr) < bytesToRead) {
moreData:
- code = GetInput(chanPtr);
- bufPtr = statePtr->inQueueHead;
-
- assert (bufPtr != NULL);
-
- if (statePtr->flags & (CHANNEL_EOF|CHANNEL_BLOCKED)) {
- /* Further reads cannot do any more */
- break;
- }
-
- if (code) {
+ if (GetInput(chanPtr)) {
/* Read error */
UpdateInterest(chanPtr);
TclChannelRelease((Tcl_Channel)chanPtr);
return -1;
}
-
- assert (IsBufferFull(bufPtr));
+ bufPtr = statePtr->inQueueHead;
}
- assert (bufPtr != NULL);
-
bytesRead = BytesLeft(bufPtr);
bytesWritten = bytesToRead;