diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-03-20 08:48:48 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-06-19 10:28:30 +0200 |
commit | 0ac177534620caa13864f9bfcd804004e3e538fd (patch) | |
tree | d5d9fdc8651f50bd4258b7f2bdae1dc78e4d6982 /src/ManagementServer.h | |
parent | 752fa808e3f148f45b689a026f0e703c83b83d92 (diff) | |
download | dabmux-0ac177534620caa13864f9bfcd804004e3e538fd.tar.gz dabmux-0ac177534620caa13864f9bfcd804004e3e538fd.tar.bz2 dabmux-0ac177534620caa13864f9bfcd804004e3e538fd.zip |
Add ptree upload to mgmt server (incomplete)
Diffstat (limited to 'src/ManagementServer.h')
-rw-r--r-- | src/ManagementServer.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ManagementServer.h b/src/ManagementServer.h index fa3f170..273f576 100644 --- a/src/ManagementServer.h +++ b/src/ManagementServer.h @@ -351,18 +351,16 @@ class ManagementServer /* Ask if there is a configuration request pending */ bool request_pending() { return m_pending; } + /* Load a ptree given by the management server. + * + * Returns true if the ptree was updated + */ + bool retrieve_new_ptree(boost::property_tree::ptree& pt); + /* Update the copy of the configuration property tree and notify the * update to the internal server thread. */ - void update_ptree(const boost::property_tree::ptree& pt) { - if (m_running) { - boost::unique_lock<boost::mutex> lock(m_configmutex); - m_pt = pt; - m_pending = false; - - m_condition.notify_one(); - } - } + void update_ptree(const boost::property_tree::ptree& pt); bool fault_detected() { return m_fault; } void restart(void); @@ -415,6 +413,7 @@ class ManagementServer /******** Configuration Data *******/ bool m_pending; + bool m_retrieve_pending; boost::condition_variable m_condition; mutable boost::mutex m_configmutex; |