# HG changeset patch # User Sebastien Jodogne # Date 1440059563 -7200 # Node ID 7c4b487b3b4ac6aa316b21dfafc2e29363265b30 # Parent 729d693369199633118f8d088d7bf5c007cc34df ensure mutual exclusion in InvokeService diff -r 729d69336919 -r 7c4b487b3b4a Plugins/Engine/OrthancPlugins.cpp --- a/Plugins/Engine/OrthancPlugins.cpp Wed Aug 19 21:16:53 2015 +0200 +++ b/Plugins/Engine/OrthancPlugins.cpp Thu Aug 20 10:32:43 2015 +0200 @@ -129,6 +129,7 @@ boost::recursive_mutex restCallbackMutex_; boost::recursive_mutex storedCallbackMutex_; boost::recursive_mutex changeCallbackMutex_; + boost::recursive_mutex invokeServiceMutex_; Properties properties_; int argc_; char** argv_; @@ -856,6 +857,8 @@ bool OrthancPlugins::InvokeService(_OrthancPluginService service, const void* parameters) { + boost::recursive_mutex::scoped_lock lock(pimpl_->invokeServiceMutex_); + switch (service) { case _OrthancPluginService_GetOrthancPath: