aboutsummaryrefslogtreecommitdiffstats
path: root/src/MuxElements.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-07-24 08:52:49 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-07-24 08:52:49 +0200
commit12d4feb0ef21d7ceb20a2af3c7970fabea015e61 (patch)
tree0e96c7b081025e501358f2114814b07c73cf3ba4 /src/MuxElements.h
parentb2c7cdef67aaec1a4a123843aebf3942a73e429b (diff)
downloaddabmux-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.h5
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);