From 12d4feb0ef21d7ceb20a2af3c7970fabea015e61 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 24 Jul 2018 08:52:49 +0200 Subject: Protect announcement switching variables with mutex --- src/MuxElements.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/MuxElements.h') diff --git a/src/MuxElements.h b/src/MuxElements.h index 73637ac..259d5d9 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -110,17 +111,15 @@ class AnnouncementCluster : public RemoteControllable { bool is_active(void); private: + mutable std::mutex m_active_mutex; bool m_active = false; - boost::optional< std::chrono::time_point< std::chrono::steady_clock> > m_deferred_start_time; - boost::optional< std::chrono::time_point< std::chrono::steady_clock> > m_deferred_stop_time; - /* Remote control */ virtual void set_parameter(const std::string& parameter, const std::string& value); -- cgit v1.2.3