# HG changeset patch # User Sebastien Jodogne # Date 1783413167 -7200 # Node ID 4c8f52f67af045a5b51687ca293d944ae1f47c70 # Parent 83fc150a2183d69e69c29195fb3b37e3a04c650b fix ServerContext::GetIngestTranscoding() diff -r 83fc150a2183 -r 4c8f52f67af0 OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Jul 07 10:29:05 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Jul 07 10:32:47 2026 +0200 @@ -172,7 +172,13 @@ result[ORTHANC_CONFIG_MAXIMUM_STORAGE_CACHE_SIZE] = lock.GetConfiguration().GetMaximumStorageCacheSize(); // New in Orthanc 1.12.12 result[ORTHANC_CONFIG_STORE_MD5_FOR_ATTACHMENTS] = lock.GetConfiguration().HasStoreMD5ForAttachments(); // New in Orthanc 1.12.12 result[ORTHANC_CONFIG_STORAGE_COMPRESSION] = lock.GetConfiguration().HasStorageCompression(); // New in Orthanc 1.11.0 - result[ORTHANC_CONFIG_INGEST_TRANSCODING] = context.GetIngestTranscoding(); // New in Orthanc 1.11.0 + + DicomTransferSyntax ingestTransferSyntax; + if (context.LookupIngestTranscoding(ingestTransferSyntax)) + { + result[ORTHANC_CONFIG_INGEST_TRANSCODING] = GetTransferSyntaxUid(ingestTransferSyntax); // New in Orthanc 1.11.0 + } + result[ORTHANC_CONFIG_DATABASE_SERVER_IDENTIFIER] = lock.GetConfiguration().GetDatabaseServerIdentifier(); result[ORTHANC_CONFIG_MAXIMUM_STORAGE_SIZE] = lock.GetConfiguration().GetMaximumStorageSize(); // New in Orthanc 1.11.3 result[ORTHANC_CONFIG_MAXIMUM_PATIENT_COUNT] = lock.GetConfiguration().GetMaximumPatientCount(); // New in Orthanc 1.12.4 diff -r 83fc150a2183 -r 4c8f52f67af0 OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Tue Jul 07 10:29:05 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Tue Jul 07 10:32:47 2026 +0200 @@ -616,15 +616,16 @@ } - std::string ServerContext::GetIngestTranscoding() const + bool ServerContext::LookupIngestTranscoding(DicomTransferSyntax& target) const { if (isIngestTranscoding_) { - return GetTransferSyntaxUid(ingestTransferSyntax_); + target = ingestTransferSyntax_; + return true; } else { - throw OrthancException(ErrorCode_BadSequenceOfCalls); + return false; } } diff -r 83fc150a2183 -r 4c8f52f67af0 OrthancServer/Sources/ServerContext.h --- a/OrthancServer/Sources/ServerContext.h Tue Jul 07 10:29:05 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.h Tue Jul 07 10:32:47 2026 +0200 @@ -336,7 +336,7 @@ return patientLevelEnabled_; } - std::string GetIngestTranscoding() const; + bool LookupIngestTranscoding(DicomTransferSyntax& target) const; void SetCompressionEnabled(bool enabled);