# HG changeset patch # User Sebastien Jodogne # Date 1786716899 -7200 # Node ID 11687f0d6e689b2dcfa056aa18978bfbb24dc020 # Parent ff382e45466a3fc333deaf1dc0e40457019901c5 fix generation of cheatsheet diff -r ff382e45466a -r 11687f0d6e68 OrthancServer/Sources/OrthancConfiguration.cpp --- 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() diff -r ff382e45466a -r 11687f0d6e68 OrthancServer/Sources/OrthancConfiguration.h --- 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 disabledWarnings_; - std::string orthancDicomAet_; OrthancConfiguration(); @@ -302,8 +301,6 @@ return disabledWarnings_.count(warning) == 0; } - void LoadOrthancAET(); - std::string GetOrthancAET() const; std::string GetMaximumStorageMode() const diff -r ff382e45466a -r 11687f0d6e68 OrthancServer/Sources/OrthancInitialization.cpp --- 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;