Mercurial > hg > orthanc-databases
diff Framework/Plugins/PluginInitialization.cpp @ 490:b3876cbb93a2
Fix check of Orthanc runtime version
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Mar 2024 14:36:38 +0100 |
parents | ecd0b719cff5 |
children | af6998ed73dd |
line wrap: on
line diff
--- a/Framework/Plugins/PluginInitialization.cpp Fri Mar 22 14:27:36 2024 +0100 +++ b/Framework/Plugins/PluginInitialization.cpp Fri Mar 22 14:36:38 2024 +0100 @@ -59,6 +59,19 @@ assert(DisplayPerformanceWarning(dbms, isIndex)); /* Check the version of the Orthanc core */ + if (OrthancPluginCheckVersion(context) == 0) + { + LOG(ERROR) << "Your version of Orthanc (" + << context->orthancVersion << ") must be above " + << ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER << "." + << ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER << "." + << ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER + << " to run this plugin"; + return false; + } + + + /* Warn the user if the Orthanc runtime has not an optimal version */ bool useFallback = true; bool isOptimal = false; @@ -89,18 +102,6 @@ # endif #endif - if (useFallback && - OrthancPluginCheckVersion(context) == 0) - { - LOG(ERROR) << "Your version of Orthanc (" - << context->orthancVersion << ") must be above " - << ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER << "." - << ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER << "." - << ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER - << " to run this plugin"; - return false; - } - if (useFallback) { std::string v(context->orthancVersion);