From 43cfb349e9558ef609284409a0cde2a88500b1b7 Mon Sep 17 00:00:00 2001 From: Christos Choutouridis Date: Thu, 2 Dec 2021 17:25:35 +0200 Subject: [PATCH] FIX: modem.clear() bug --- include/drv/cli_device.h | 1 + include/utils/print.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/drv/cli_device.h b/include/drv/cli_device.h index e228492..899ac00 100644 --- a/include/drv/cli_device.h +++ b/include/drv/cli_device.h @@ -283,6 +283,7 @@ class cli_device //! Clears the incoming data buffer void clear () noexcept { rx_q.clear(); + streams_.store(size_t(0), std::memory_order_release); } //! \return Returns the size of the incoming data buffer diff --git a/include/utils/print.h b/include/utils/print.h index 6ba331c..b4b8128 100644 --- a/include/utils/print.h +++ b/include/utils/print.h @@ -50,7 +50,7 @@ namespace tbx { * * Requirements: * - size_t write_impl(const Char_t* buffer, size_t size) : Return the number of \c Char_t written - * - size_t write_(const Char_t ch) : Return the number of \c Char_t written (normally one). + * - size_t write_impl(const Char_t ch) : Return the number of \c Char_t written (normally one). * * \tparam Impl_t The derived type * \tparam Char_t The char type to use