17
0
Files
orthanc-dicomweb/framework2.diff
Axel Braun bf43ec4ee9 - version 1.22
* framework2.diff added for compatibilty with Orthanc framework <= 1.12.10
  * Fixed a possible deadlock when using "WadoRsLoaderThreadsCount" > 1 when the HTTP
    client disconnects while downloading the response.
  * Fixed "Success: Success" errors when trying to send resources synchronously to a remote DICOMweb
    server while the Orthanc job engine was busy with other tasks.

OBS-URL: https://build.opensuse.org/package/show/graphics/orthanc-dicomweb?expand=0&rev=46
2025-12-10 10:31:16 +00:00

47 lines
1.6 KiB
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++)