Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63036 - trunk/boost/iostreams/detail/streambuf
From: steven_at_[hidden]
Date: 2010-06-16 23:46:39


Author: steven_watanabe
Date: 2010-06-16 23:46:38 EDT (Wed, 16 Jun 2010)
New Revision: 63036
URL: http://svn.boost.org/trac/boost/changeset/63036

Log:
Make sure that direct_streambuf and indirect_streambuf are reset correctly on open. Fixes #4102.
Text files modified:
   trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp | 2 ++
   trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp | 1 +
   2 files changed, 3 insertions(+), 0 deletions(-)

Modified: trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp
==============================================================================
--- trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp (original)
+++ trunk/boost/iostreams/detail/streambuf/direct_streambuf.hpp 2010-06-16 23:46:38 EDT (Wed, 16 Jun 2010)
@@ -121,6 +121,8 @@
     init_output(category());
     setg(0, 0, 0);
     setp(0, 0);
+ this->set_true_eof(false);
+ this->set_needs_close();
 }
 
 template<typename T, typename Tr>

Modified: trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
==============================================================================
--- trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp (original)
+++ trunk/boost/iostreams/detail/streambuf/indirect_streambuf.hpp 2010-06-16 23:46:38 EDT (Wed, 16 Jun 2010)
@@ -189,6 +189,7 @@
     if (can_write() && buffer_size > 1)
         flags_ |= f_output_buffered;
     this->set_true_eof(false);
+ this->set_needs_close();
 }
 
 template<typename T, typename Tr, typename Alloc, typename Mode>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk