Mercurial > hg > orthanc-dicomweb
changeset 740:f91a925218f2
fix compatibility with Orthanc framework <= 1.12.10
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Tue, 09 Dec 2025 07:57:08 +0100 |
| parents | d0f74c22897d |
| children | 7294a7d97cc9 |
| files | Plugin/WadoRs.cpp |
| diffstat | 1 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugin/WadoRs.cpp Tue Dec 02 17:17:12 2025 +0100 +++ b/Plugin/WadoRs.cpp Tue Dec 09 07:57:08 2025 +0100 @@ -32,9 +32,12 @@ #include <Toolbox.h> #include <SerializationToolbox.h> #include <MultiThreading/SharedMessageQueue.h> -#include <MultiThreading/BlockingSharedMessageQueue.h> #include <Compression/GzipCompressor.h> +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11) +# include <MultiThreading/BlockingSharedMessageQueue.h> +#endif + #include <memory> #include <boost/thread/mutex.hpp> #include <boost/thread.hpp> @@ -445,11 +448,16 @@ class ThreadedInstanceLoader : public InstanceLoader { +private: std::vector<boost::thread*> threads_; Orthanc::SharedMessageQueue instancesToPreload_; +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11) Orthanc::BlockingSharedMessageQueue loadedInstances_; +#else + Orthanc::SharedMessageQueue loadedInstances_; +#endif bool loadersShouldStop_; @@ -457,7 +465,11 @@ ThreadedInstanceLoader(size_t threadCount, bool transcode, Orthanc::DicomTransferSyntax transferSyntax) : InstanceLoader(transcode, transferSyntax), instancesToPreload_(0), - loadedInstances_(3*threadCount), // to limit the number of loaded instances in memory +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11) + loadedInstances_(3 * threadCount), // to limit the number of loaded instances in memory +#else + loadedInstances_(0), // don't limit the number of loaded instances, otherwise extra instances would be lost +#endif loadersShouldStop_(false) { for (size_t i = 0; i < threadCount; i++)
