diff OrthancServer/Sources/main.cpp @ 4451:f4dbdb2dcba6

new configuration option "MaximumPduLength" to tune the maximum PDU length
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 18 Jan 2021 14:51:52 +0100
parents f77ee6e6cf47
children e4dae17035b9
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp	Thu Jan 14 09:13:29 2021 +0100
+++ b/OrthancServer/Sources/main.cpp	Mon Jan 18 14:51:52 2021 +0100
@@ -68,6 +68,7 @@
 static const char* const KEY_DICOM_TLS_ENABLED = "DicomTlsEnabled";
 static const char* const KEY_DICOM_TLS_CERTIFICATE = "DicomTlsCertificate";
 static const char* const KEY_DICOM_TLS_TRUSTED_CERTIFICATES = "DicomTlsTrustedCertificates";
+static const char* const KEY_MAXIMUM_PDU_LENGTH = "MaximumPduLength";
 
 
 class OrthancStoreRequestHandler : public IStoreRequestHandler
@@ -1207,6 +1208,8 @@
         dicomServer.SetTrustedCertificatesPath(
           lock.GetConfiguration().GetStringParameter(KEY_DICOM_TLS_TRUSTED_CERTIFICATES, ""));
       }
+
+      dicomServer.SetMaximumPduLength(lock.GetConfiguration().GetUnsignedIntegerParameter(KEY_MAXIMUM_PDU_LENGTH, 16384));
     }
 
 #if ORTHANC_ENABLE_PLUGINS == 1
@@ -1462,6 +1465,8 @@
       lock.GetConfiguration().GetStringParameter(KEY_DICOM_TLS_CERTIFICATE, ""));
     DicomAssociationParameters::SetDefaultTrustedCertificatesPath(
       lock.GetConfiguration().GetStringParameter(KEY_DICOM_TLS_TRUSTED_CERTIFICATES, ""));
+    DicomAssociationParameters::SetDefaultMaximumPduLength(
+      lock.GetConfiguration().GetUnsignedIntegerParameter(KEY_MAXIMUM_PDU_LENGTH, 16384));
   }
   
   ServerContext context(database, storageArea, false /* not running unit tests */, maxCompletedJobs);