diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-07-24 08:52:49 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-07-24 08:52:49 +0200 |
commit | 12d4feb0ef21d7ceb20a2af3c7970fabea015e61 (patch) | |
tree | 0e96c7b081025e501358f2114814b07c73cf3ba4 /src/MuxElements.h | |
parent | b2c7cdef67aaec1a4a123843aebf3942a73e429b (diff) | |
download | dabmux-12d4feb0ef21d7ceb20a2af3c7970fabea015e61.tar.gz dabmux-12d4feb0ef21d7ceb20a2af3c7970fabea015e61.tar.bz2 dabmux-12d4feb0ef21d7ceb20a2af3c7970fabea015e61.zip |
Protect announcement switching variables with mutex
Diffstat (limited to 'src/MuxElements.h')
-rw-r--r-- | src/MuxElements.h | 5 |
1 files changed, 2 insertions, 3 deletions
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 <vector> #include <memory> +#include <mutex> #include <string> #include <functional> #include <exception> @@ -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); |