|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77033 - in trunk: boost/asio/detail libs/asio/doc
From: chris_at_[hidden]
Date: 2012-02-15 17:16:56
Author: chris_kohlhoff
Date: 2012-02-15 17:16:53 EST (Wed, 15 Feb 2012)
New Revision: 77033
URL: http://svn.boost.org/trac/boost/changeset/77033
Log:
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:
trunk/boost/asio/detail/buffer_sequence_adapter.hpp | 6 ++++--
trunk/libs/asio/doc/history.qbk | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
Modified: trunk/boost/asio/detail/buffer_sequence_adapter.hpp
==============================================================================
--- trunk/boost/asio/detail/buffer_sequence_adapter.hpp (original)
+++ trunk/boost/asio/detail/buffer_sequence_adapter.hpp 2012-02-15 17:16:53 EST (Wed, 15 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: trunk/libs/asio/doc/history.qbk
==============================================================================
--- trunk/libs/asio/doc/history.qbk (original)
+++ trunk/libs/asio/doc/history.qbk 2012-02-15 17:16:53 EST (Wed, 15 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