# HG changeset patch # User Sebastien Jodogne # Date 1650896887 -7200 # Node ID baf2b0c3ef0e6cc972cc65c49dff0aa72d620b8c # Parent 87b0e7e4d8d50a24f8df154b209b6fbeb7b7776c enforce minimal version of Orthanc core (1.11.0), not only of SDK diff -r 87b0e7e4d8d5 -r baf2b0c3ef0e Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Mon Apr 25 15:51:49 2022 +0200 +++ b/Plugin/Plugin.cpp Mon Apr 25 16:28:07 2022 +0200 @@ -35,6 +35,11 @@ #include +#define ORTHANC_CORE_MINIMAL_MAJOR 1 +#define ORTHANC_CORE_MINIMAL_MINOR 11 +#define ORTHANC_CORE_MINIMAL_REVISION 0 + + static const char* const HAS_DELETE = "HasDelete"; @@ -512,6 +517,20 @@ return -1; } + if (!OrthancPlugins::CheckMinimalOrthancVersion(ORTHANC_CORE_MINIMAL_MAJOR, + ORTHANC_CORE_MINIMAL_MINOR, + ORTHANC_CORE_MINIMAL_REVISION)) + { + char info[1024]; + sprintf(info, "Your version of Orthanc (%s) must be above %d.%d.%d to run this plugin", + context->orthancVersion, + ORTHANC_CORE_MINIMAL_MAJOR, + ORTHANC_CORE_MINIMAL_MINOR, + ORTHANC_CORE_MINIMAL_REVISION); + OrthancPluginLogError(context, info); + return -1; + } + #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_CLIENT == 0 LOG(WARNING) << "Performance warning in DICOMweb: The plugin was compiled against " << "Orthanc SDK <= 1.5.6. STOW and WADO chunked transfers will be entirely stored in RAM.";