Add handler tracking locations to icy_stream

This commit is contained in:
Richard Hodges
2020-08-25 13:48:25 +02:00
parent 11385141ea
commit 4357e8356e
2 changed files with 28 additions and 9 deletions

View File

@ -1,5 +1,6 @@
Version XXX: Version XXX:
* Add handler tracking locations to icy_stream.
* Add handler tracking locations to basic_stream. * Add handler tracking locations to basic_stream.
* Add handler tracking locations to http operations. * Add handler tracking locations to http operations.

View File

@ -95,10 +95,16 @@ public:
{ {
// Try to read the first three characters // Try to read the first three characters
BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD
s_.next_layer().async_read_some( {
net::mutable_buffer( BOOST_ASIO_HANDLER_LOCATION((
s_.buf_ + s_.n_, 3 - s_.n_), __FILE__, __LINE__,
std::move(*this)); "http::icy_stream::async_read_some"));
s_.next_layer().async_read_some(
net::mutable_buffer(
s_.buf_ + s_.n_, 3 - s_.n_),
std::move(*this));
}
s_.n_ += static_cast<char>(bytes_transferred); s_.n_ += static_cast<char>(bytes_transferred);
if(ec) if(ec)
goto upcall; goto upcall;
@ -127,8 +133,14 @@ public:
else else
{ {
BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD
s_.next_layer().async_read_some( {
b_, std::move(*this)); BOOST_ASIO_HANDLER_LOCATION((
__FILE__, __LINE__,
"http::icy_stream::async_read_some"));
s_.next_layer().async_read_some(
b_, std::move(*this));
}
} }
upcall: upcall:
if(! cont) if(! cont)
@ -136,9 +148,15 @@ public:
ec_ = ec; ec_ = ec;
n_ = bytes_transferred; n_ = bytes_transferred;
BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD
s_.next_layer().async_read_some( {
net::mutable_buffer{}, BOOST_ASIO_HANDLER_LOCATION((
std::move(*this)); __FILE__, __LINE__,
"http::icy_stream::async_read_some"));
s_.next_layer().async_read_some(
net::mutable_buffer{},
std::move(*this));
}
ec = ec_; ec = ec_;
bytes_transferred = n_; bytes_transferred = n_;
} }