Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77056 - in branches/release: boost/asio/detail libs/asio/doc
From: chris_at_[hidden]
Date: 2012-02-17 08:13:12


Author: chris_kohlhoff
Date: 2012-02-17 08:13:11 EST (Fri, 17 Feb 2012)
New Revision: 77056
URL: http://svn.boost.org/trac/boost/changeset/77056

Log:
Merge [77033] from trunk:

Fixed a bug where the second buffer in an array of two buffers may be ignored
if the first buffer is empty.

Text files modified:
   branches/release/boost/asio/detail/buffer_sequence_adapter.hpp | 6 ++++--
   branches/release/libs/asio/doc/history.qbk | 2 ++
   2 files changed, 6 insertions(+), 2 deletions(-)

Modified: branches/release/boost/asio/detail/buffer_sequence_adapter.hpp
==============================================================================
--- branches/release/boost/asio/detail/buffer_sequence_adapter.hpp (original)
+++ branches/release/boost/asio/detail/buffer_sequence_adapter.hpp 2012-02-17 08:13:11 EST (Fri, 17 Feb 2012)
@@ -291,7 +291,8 @@
 
   static Buffer first(const boost::array<Elem, 2>& buffer_sequence)
   {
- return Buffer(buffer_sequence[0]);
+ return Buffer(boost::asio::buffer_size(buffer_sequence[0]) != 0
+ ? buffer_sequence[0] : buffer_sequence[1]);
   }
 
 private:
@@ -344,7 +345,8 @@
 
   static Buffer first(const std::array<Elem, 2>& buffer_sequence)
   {
- return Buffer(buffer_sequence[0]);
+ return Buffer(boost::asio::buffer_size(buffer_sequence[0]) != 0
+ ? buffer_sequence[0] : buffer_sequence[1]);
   }
 
 private:

Modified: branches/release/libs/asio/doc/history.qbk
==============================================================================
--- branches/release/libs/asio/doc/history.qbk (original)
+++ branches/release/libs/asio/doc/history.qbk 2012-02-17 08:13:11 EST (Fri, 17 Feb 2012)
@@ -32,6 +32,8 @@
 * Reverted earlier change to allow some speculative operations to be performed
   without holding the lock, as it introduced a race condition in some
   multithreaded scenarios.
+* Fixed a bug where the second buffer in an array of two buffers may be ignored
+ if the first buffer is empty.
 
 [heading Asio 1.6.1 / Boost 1.48]
 


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