Mercurial > hg > orthanc
changeset 7126:11687f0d6e68
fix generation of cheatsheet
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Fri, 14 Aug 2026 16:14:59 +0200 |
| parents | ff382e45466a |
| children | 133a8ad4f472 |
| files | OrthancServer/Sources/OrthancConfiguration.cpp OrthancServer/Sources/OrthancConfiguration.h OrthancServer/Sources/OrthancInitialization.cpp |
| diffstat | 3 files changed, 10 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancConfiguration.cpp Fri Aug 14 16:00:25 2026 +0200 +++ b/OrthancServer/Sources/OrthancConfiguration.cpp Fri Aug 14 16:14:59 2026 +0200 @@ -367,26 +367,25 @@ return workersThread; } - void OrthancConfiguration::LoadOrthancAET() + std::string OrthancConfiguration::GetOrthancAET() const { - std::string dicomAet = GetStringParameter(ORTHANC_CONFIG_DICOM_AET); + std::string aet = GetStringParameter(ORTHANC_CONFIG_DICOM_AET); - if (!Toolbox::IsValidAet(dicomAet)) + if (!Toolbox::IsValidAet(aet)) { - throw OrthancException(ErrorCode_BadFileFormat, std::string("The ") + ORTHANC_CONFIG_DICOM_AET + " contains characters that are not valid for an AET"); + throw OrthancException(ErrorCode_BadFileFormat, std::string("Option \"") + ORTHANC_CONFIG_DICOM_AET + + "\" contains characters that are not valid for an AET"); } - orthancDicomAet_ = Toolbox::NormalizeAet(dicomAet); - } + aet = Toolbox::NormalizeAet(aet); - std::string OrthancConfiguration::GetOrthancAET() const - { - if (orthancDicomAet_.empty()) + if (aet.empty()) { - throw Orthanc::OrthancException(ErrorCode_BadSequenceOfCalls); + throw Orthanc::OrthancException(ErrorCode_ParameterOutOfRange, std::string("Option \"") + ORTHANC_CONFIG_DICOM_AET + + "\" is empty after normalization"); } - return orthancDicomAet_; + return aet; } void OrthancConfiguration::LoadPeers()
--- a/OrthancServer/Sources/OrthancConfiguration.h Fri Aug 14 16:00:25 2026 +0200 +++ b/OrthancServer/Sources/OrthancConfiguration.h Fri Aug 14 16:14:59 2026 +0200 @@ -97,7 +97,6 @@ JobsEngineThreadsCount jobsEngineThreadsCount_; ServerIndex* serverIndex_; std::set<Warnings> disabledWarnings_; - std::string orthancDicomAet_; OrthancConfiguration(); @@ -302,8 +301,6 @@ return disabledWarnings_.count(warning) == 0; } - void LoadOrthancAET(); - std::string GetOrthancAET() const; std::string GetMaximumStorageMode() const
--- a/OrthancServer/Sources/OrthancInitialization.cpp Fri Aug 14 16:00:25 2026 +0200 +++ b/OrthancServer/Sources/OrthancInitialization.cpp Fri Aug 14 16:14:59 2026 +0200 @@ -349,7 +349,6 @@ // Read the user-provided configuration lock.GetConfiguration().Read(configurationPaths); - lock.GetConfiguration().LoadOrthancAET(); // read it early because we need it for the ServerDatabaseIdentifier { std::string locale;
