diff options
author | dgp <dgp@users.sourceforge.net> | 2014-06-04 16:42:21 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-06-04 16:42:21 (GMT) |
commit | cb1e14e0ebfadf76d687fdb2164dfa4b09b56859 (patch) | |
tree | 894ba1d33e785ddd117556c66196f81f6cf6aaad /generic/tclIO.c | |
parent | 3334cf21036e825053a8faedd661a4486ce1c673 (diff) | |
parent | 3189f48d19ee5fe595f856ca7d755f61414cfbef (diff) | |
download | tcl-cb1e14e0ebfadf76d687fdb2164dfa4b09b56859.zip tcl-cb1e14e0ebfadf76d687fdb2164dfa4b09b56859.tar.gz tcl-cb1e14e0ebfadf76d687fdb2164dfa4b09b56859.tar.bz2 |
Revise DiscardOutput() to account for revisions to the loop in FlushChannel() which is its only caller. We need to discard the curOutPtr buffer as well, and not count on another pass through the loop to attempt to flush it (and raise the same failure again?).
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 998fe5e..9197b06 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -2503,6 +2503,11 @@ DiscardOutputQueued( } statePtr->outQueueHead = NULL; statePtr->outQueueTail = NULL; + bufPtr = statePtr->curOutPtr; + if (bufPtr && BytesLeft(bufPtr)) { + statePtr->curOutPtr = NULL; + RecycleBuffer(statePtr, bufPtr, 0); + } } /* |