Mercurial > hg > orthanc
diff OrthancServer/Plugins/Engine/OrthancPlugins.cpp @ 4607:f75c63aa9de0 db-changes
differentiating between shared and private global properties
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Mar 2021 18:10:27 +0200 |
parents | d01702fb29a9 |
children | 2684544ff03c |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue Mar 30 16:34:23 2021 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue Mar 30 18:10:27 2021 +0200 @@ -4212,8 +4212,11 @@ } else { + // TODO - Plugins can only access global properties of their + // own Orthanc server (no access to the shared global properties) PImpl::ServerContextLock lock(*pimpl_); - lock.GetContext().GetIndex().SetGlobalProperty(static_cast<GlobalProperty>(p.property), p.value); + lock.GetContext().GetIndex().SetGlobalProperty(static_cast<GlobalProperty>(p.property), + false /* not shared */, p.value); return true; } } @@ -4226,8 +4229,11 @@ std::string result; { + // TODO - Plugins can only access global properties of their + // own Orthanc server (no access to the shared global properties) PImpl::ServerContextLock lock(*pimpl_); - result = lock.GetContext().GetIndex().GetGlobalProperty(static_cast<GlobalProperty>(p.property), p.value); + result = lock.GetContext().GetIndex().GetGlobalProperty(static_cast<GlobalProperty>(p.property), + false /* not shared */, p.value); } *(p.result) = CopyString(result); @@ -5024,9 +5030,7 @@ case _OrthancPluginService_RegisterDatabaseBackend: { - // TODO - WARN ABOUT PERFORMANCE - - CLOG(INFO, PLUGINS) << "Plugin has registered a custom database back-end"; + LOG(WARNING) << "Performance warning: Plugin has registered a custom database back-end with an old API"; const _OrthancPluginRegisterDatabaseBackend& p = *reinterpret_cast<const _OrthancPluginRegisterDatabaseBackend*>(parameters); @@ -5049,9 +5053,7 @@ case _OrthancPluginService_RegisterDatabaseBackendV2: { - // TODO - WARN ABOUT PERFORMANCE - - CLOG(INFO, PLUGINS) << "Plugin has registered a custom database back-end"; + LOG(WARNING) << "Performance warning: Plugin has registered a custom database back-end with an old API"; const _OrthancPluginRegisterDatabaseBackendV2& p = *reinterpret_cast<const _OrthancPluginRegisterDatabaseBackendV2*>(parameters);