FairMQ DDS plugin: fix incomplete shutdown when dds server is terminated

This commit is contained in:
Alexey Rybalchenko
2018-02-13 08:37:09 +01:00
committed by Mohammad Al-Turany
parent f8d4fe01d0
commit abcc5083f2
4 changed files with 38 additions and 33 deletions

View File

@@ -104,7 +104,7 @@ auto PluginServices::ChangeDeviceState(const std::string& controller, const Devi
{
throw DeviceControlError{tools::ToString(
"Plugin '", controller, "' is not allowed to change device states. ",
"Currently, plugin '", fDeviceController, "' has taken control."
"Currently, plugin '", *fDeviceController, "' has taken control."
)};
}
}
@@ -125,7 +125,7 @@ auto PluginServices::TakeDeviceControl(const std::string& controller) -> void
{
throw DeviceControlError{tools::ToString(
"Plugin '", controller, "' is not allowed to take over control. ",
"Currently, plugin '", fDeviceController, "' has taken control."
"Currently, plugin '", *fDeviceController, "' has taken control."
)};
}
}
@@ -134,10 +134,7 @@ auto PluginServices::StealDeviceControl(const std::string& controller) -> void
{
lock_guard<mutex> lock{fDeviceControllerMutex};
if (!fDeviceController)
{
fDeviceController = controller;
}
fDeviceController = controller;
}
auto PluginServices::ReleaseDeviceControl(const std::string& controller) -> void