mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Device: Make IO system thread-safe
This commit is contained in:
@@ -95,6 +95,7 @@ protected:
|
||||
void handleDeviceStatus(const std::shared_ptr<Message>& message) override {
|
||||
if(!message || message->data.size() < sizeof(neovifire2_status_t))
|
||||
return;
|
||||
std::lock_guard<std::mutex> lk(ioMutex);
|
||||
const neovifire2_status_t* status = reinterpret_cast<const neovifire2_status_t*>(message->data.data());
|
||||
backupPowerEnabled = status->backupPowerEnabled;
|
||||
backupPowerGood = status->backupPowerGood;
|
||||
|
||||
Reference in New Issue
Block a user