changeset 7092:8bdb4ff3b484 streaming

removed unused variable ArchiveJob::loaderThreads_
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Aug 2026 10:53:03 +0000
parents 5192f6a4cbb8
children fc7b11559381
files OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp OrthancServer/Sources/ServerJobs/ArchiveJob.cpp OrthancServer/Sources/ServerJobs/ArchiveJob.h
diffstat 3 files changed, 2 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp	Thu Aug 13 10:40:58 2026 +0000
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp	Thu Aug 13 10:53:03 2026 +0000
@@ -124,7 +124,6 @@
                                DicomTransferSyntax& syntax,  /* out */
                                unsigned int& lossyQuality,   /* out */
                                int& priority,                /* out */
-                               unsigned int& loaderThreads,  /* out */
                                std::string& filename,        /* out */
                                Json::Value& userData,        /* out */
                                bool& allowUtf8,              /* out (new in Orthanc 1.12.11) */
@@ -185,11 +184,6 @@
       userData = body[KEY_USER_DATA].asString();
     }
 
-    {
-      OrthancConfiguration::ReaderLock lock;
-      loaderThreads = lock.GetConfiguration().GetLoaderThreads();
-    }
-
     // New in Orthanc 1.12.11
     if (body.type() == Json::objectValue &&
         body.isMember(KEY_ALLOW_UTF8))
@@ -630,14 +624,13 @@
       bool synchronous, extended, transcode;
       DicomTransferSyntax transferSyntax;
       int priority;
-      unsigned int loaderThreads;
       std::string filename;
       unsigned int lossyQuality;
       Json::Value userData;
       bool allowUtf8;
 
       GetJobParameters(synchronous, extended, transcode, transferSyntax, lossyQuality,
-                       priority, loaderThreads, filename, userData, allowUtf8,
+                       priority, filename, userData, allowUtf8,
                        body, DEFAULT_IS_EXTENDED, "Archive.zip", defaultUtf8);
       
       std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended, ResourceType_Patient));
@@ -649,7 +642,6 @@
         job->SetLossyQuality(lossyQuality);
       }
       
-      job->SetLoaderThreads(loaderThreads);
       job->SetAllowUtf8(allowUtf8);
       job->SetUserData(userData);
 
@@ -785,12 +777,6 @@
       job->SetLossyQuality(GetLossyQuality(call));
     }
 
-    {
-      OrthancConfiguration::ReaderLock lock;
-      unsigned int loaderThreads = lock.GetConfiguration().GetLoaderThreads();
-      job->SetLoaderThreads(loaderThreads);
-    }
-
     SubmitJob(call.GetOutput(), context, job, 0 /* priority */,
               true /* synchronous */, filename);
   }
@@ -832,14 +818,13 @@
       bool synchronous, extended, transcode;
       DicomTransferSyntax transferSyntax;
       int priority;
-      unsigned int loaderThreads;
       std::string filename;
       unsigned int lossyQuality;
       Json::Value userData;
       bool allowUtf8;
 
       GetJobParameters(synchronous, extended, transcode, transferSyntax, lossyQuality,
-                       priority, loaderThreads, filename, userData, allowUtf8,
+                       priority, filename, userData, allowUtf8,
                        body, false /* by default, not extented */, id + ".zip", defaultUtf8);
       
       std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended, LEVEL));
@@ -851,7 +836,6 @@
         job->SetLossyQuality(lossyQuality);
       }
 
-      job->SetLoaderThreads(loaderThreads);
       job->SetAllowUtf8(allowUtf8);
       job->SetUserData(userData);
 
--- a/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp	Thu Aug 13 10:40:58 2026 +0000
+++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp	Thu Aug 13 10:53:03 2026 +0000
@@ -1044,7 +1044,6 @@
     transferSyntax_(DicomTransferSyntax_LittleEndianImplicit),
     hasLossyQuality_(false),
     lossyQuality_(100),
-    loaderThreads_(1),
     allowUtf8_(false)
   {
   }
@@ -1159,19 +1158,6 @@
   }
 
 
-  void ArchiveJob::SetLoaderThreads(unsigned int loaderThreads)
-  {
-    if (writer_.get() != NULL)   // Already started
-    {
-      throw OrthancException(ErrorCode_BadSequenceOfCalls);
-    }
-    else
-    {
-      loaderThreads_ = std::max(1u, loaderThreads);
-    }
-  }
-
-
   void ArchiveJob::SetAllowUtf8(bool allowUtf8)
   {
     if (writer_.get() != NULL)   // Already started
--- a/OrthancServer/Sources/ServerJobs/ArchiveJob.h	Thu Aug 13 10:40:58 2026 +0000
+++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.h	Thu Aug 13 10:53:03 2026 +0000
@@ -72,9 +72,6 @@
     bool                 hasLossyQuality_;
     unsigned int         lossyQuality_;
 
-    // New in Orthanc 1.10.0
-    unsigned int         loaderThreads_;
-
     // New in Orthanc 1.12.11
     bool                 allowUtf8_;
 
@@ -112,8 +109,6 @@
 
     void SetLossyQuality(unsigned int lossyQuality);
 
-    void SetLoaderThreads(unsigned int loaderThreads);
-
     void SetAllowUtf8(bool allowUtf8);
 
     virtual void Reset() ORTHANC_OVERRIDE;