Mercurial > hg > orthanc
diff OrthancServer/Plugins/Engine/OrthancPluginDatabase.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 | cc64385593ef |
children | 95ffe3b6ef7c |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp Tue Mar 30 16:34:23 2021 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp Tue Mar 30 18:10:27 2021 +0200 @@ -1129,8 +1129,12 @@ virtual bool LookupGlobalProperty(std::string& target, - GlobalProperty property) ORTHANC_OVERRIDE + GlobalProperty property, + bool shared) ORTHANC_OVERRIDE { + // "shared" is unused, as database plugins using Orthanc SDK <= + // 1.9.1 are not compatible with multiple readers/writers + ResetAnswers(); CheckSuccess(that_.backend_.lookupGlobalProperty @@ -1291,8 +1295,12 @@ virtual void SetGlobalProperty(GlobalProperty property, + bool shared, const std::string& value) ORTHANC_OVERRIDE { + // "shared" is unused, as database plugins using Orthanc SDK <= + // 1.9.1 are not compatible with multiple readers/writers + CheckSuccess(that_.backend_.setGlobalProperty (that_.payload_, static_cast<int32_t>(property), value.c_str())); } @@ -1527,7 +1535,7 @@ std::string tmp; fastGetTotalSize_ = - (transaction.LookupGlobalProperty(tmp, GlobalProperty_GetTotalSizeIsFast) && + (transaction.LookupGlobalProperty(tmp, GlobalProperty_GetTotalSizeIsFast, true /* unused in old databases */) && tmp == "1"); if (fastGetTotalSize_)