Skip to content
Snippets Groups Projects
Commit 0a74fa27 authored by Mathieu Geisert (old)'s avatar Mathieu Geisert (old) Committed by Florent Lamiraux
Browse files

Lock mutex when writing/reading newNodeConfigurations

  - fix error when multi-threads client is calling "refresh" and
    "applyConfiguration" at the same time.
parent fe08ea02
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,9 @@ namespace graphics {
void GraphicalInterface::refresh () throw (Error)
{
try {
mtx_.lock();
return windowsManager_->refresh ();
mtx_.unlock();
} catch (const std::exception& exc) {
throw Error (exc.what ());
}
......@@ -321,7 +323,9 @@ namespace graphics {
bool GraphicalInterface::applyConfiguration (const char* nodeNameCorba, const value_type* configurationCorba) throw (Error)
{
try {
mtx_.lock();
return windowsManager_->applyConfiguration ( nodeNameCorba, configurationCorba) ;
mtx_.unlock();
} catch (const std::exception& exc) {
throw Error (exc.what ());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment